## 4 Adaptive Method of Improving the Processing Parameters in the Frequency-to-Code Converter
In addition, the value of the frequency change factor is stored in the memory for use in computing the period value with index \(i+1\). In the case that the error does not exceed the predetermined value (option \"N\" Figures 8 and 9), the procedure ends without changing the reference frequency correction coefficient, performing only the operation of assigning the period with index \(i+1\) to the value of the coefficient of change as for the period with index \(i\). As a result, pairs of numbers are stored in the memory of the frequency-to-code converter: the calculated state differences corresponding to the successive periods \(T_{xi}\) and the values of the frequency change factor set in the prescaler/multiplier module when measuring the length of these periods. Thanks to this, the master device, which is most often a computer, can read the assigned, stored data pairs through the interface and calculate the values of the successive \(T_{xi}\) periods. The operation requires only taking into account the constant for a given converter frequency-to-code frequency of the clock signal, which can also be sent by the converter or entered directly into the master device software. Figure 7: Structure of the f/N converter enabling the implementation of the adaptive method. In the case of using a processor with sufficient computational speed compared to the rate of change of frequency of the processed variable frequency signal, it is possible to calculate the period value directly in the frequency-to-code converter. The algorithm for measuring the variable frequency with an f/N converter with a microprocessor system with a satisfactory performance is shown in Figure 9. In this case, the processor also calculates the difference of states read from the counter system, which represents the period value, taking into account the degree of frequency correction in the prescaler/multiplier module and the frequency \(f_{0}\) of the generator model. The computed difference is used to determine the maximum value of the total error made in measuring the period \(T_{xi}\)[14], then the computed state difference is used to calculate the actual period value, which is then stored at a given index \(i\) in the RAM. Upon detecting that the admissible quantization error value has been exceeded (option \"Y\"), the procedure calculates a frequency correction factor that allows the processing error (8) to be reduced to the limit set in the program and changes the frequency correction factor in the prescaler/multiplier module. In addition, the value of the frequency shift factor is stored in memory for use in computing the period value  
Figure 8: Work algorithm of the f/N converter containing a microprocessor system with low efficiency. with the index \(i+1\). If the error does not exceed the set value (option \"N\"), the procedure ends without changing the change factor of frequency, performing only the operation of assigning the \(i+1\) period to the scaling factor value, such as for the period with the index \(i\). In the case of the alternative algorithm, the master device has the ability to directly read the successive values of the period calculated in seconds. Figure 9: Work algorithm of the f/N converter containing a microprocessor system of satisfactory efficiency.