Tutorials to .com

Tutorials to .com » Mechine » Mcu » 8051 based on the frequency of measurement techniques

8051 based on the frequency of measurement techniques

Print View , by: iSee ,Total views: 14 ,Word Count: 1701 ,Date: Wed, 22 Jul 2009 Time: 9:57 AM

0 Introduction

With the development of radio technology and the popularity of "frequency" has become familiar to the masses of the physical. And the emergence of single-chip, but also including frequency measurement, including a variety of measurement techniques has brought many major leap forward, however, small size, cheap, functional and strong E-field advantage is also a very important position. For this purpose. In this paper, a single-chip microcomputer as the core of the frequency measurement system design.

1 Frequency Measurement System hardware structure

The general method of measuring the frequency of frequency measurement method is divided into passive, active and electronic measuring frequency count of three. Passive frequency measurement method (can be divided into resonant and Bridge), commonly used in measuring the frequency of thick, about 1% accuracy. Active comparative law can be divided into beats and difference frequency generation method, which is the use of linear superposition of two signals to generate a beat frequency phenomenon, and then by detecting the phenomenon of zero-beat frequency, commonly used in low-frequency measurements, the error in the zero point something Hz ; the latter is the use of superposition of two non-linear signal to produce beat frequency phenomenon, and then through the homodyne detection of the phenomenon of frequency, commonly used in high-frequency measurement error of about ± 20 Hz. The above method in the scope and accuracy of measurement have a certain lack of, and e-counting is controlled primarily by single-chip microcomputer. Due to the strong single-chip control and computing functions, the electronic counting method of measuring frequency range, high precision, easy to implement. The design is based on the single-chip electronic counting method to measure the frequency, the system hardware block diagram shown in Figure 1.

8051 based on the frequency of measurement techniques

In order to improve the accuracy of measurement, frequency measurement to expand the scope of SCM, the design has taken on sub-band signal method. Design using two synchronous decimal counter 74LS160 adder 100 to form a divider. The two synchronous prescaler 100 decimal adder 74LS160 counter and a 74LS00 NAND gate from a common design. 74LS160 be due to a frequency of 10 minutes a side, and when the first piece of work 74LS160, if there is binary, there TC output binary signal into a second end of the CEP, CET at the same time also high, so that the two end state control of the work of CET, CEP will be high at the same time, when the second film will begin the work of 74LS160.

2 frequency measurement circuit design module

With single-chip electronic counting frequency of measurement frequency and test cycle in two ways. Measurement of the frequency of the main unit from time to time in the time of the measured pulse count signal; measurement cycle is a cycle in the measured time signal of a reference clock pulse to count.

2.1 Frequency Measurement Act 8051 of the error analysis

Electronic counter frequency measurement method is the measured frequency signals will be added to the count of counter input, and then let the time counter in the standard count Ts1 carried out, from the value of N1. The frequency of the measured signal and the relationship between the fx1 is as follows:

8051 based on the frequency of measurement techniques

Electronic counter measure Zhou fs2 type of standard frequency signals to the counter input count, and let the measured signal frequency control counter counts fx2 time, from the value of the relationship between the N2 and fx2 is as follows:

8051 based on the frequency of measurement techniques

In fact, by any method of frequency measurement, the main error sources are due to integer counters can only count arising from the ± 1 error:

8051 based on the frequency of measurement techniques

Can be seen in the same Ts, the frequency measurement method of low-frequency fx1 client, the error is much larger than high-frequency side, and measured in weeks of high-frequency end fx2, the error is much larger than low-frequency side. Theoretical studies have shown that n such as repeated measurements and then take the average, the ± 1 error will be reduced n times. Such as a given ± 1 error ε0, called ε ≤ ε0ο method of measuring frequency to fx1 ≥ 8051 based on the frequency of measurement techniques Weeks of testing the law requested fx2 ≤ ε0fs2ο, therefore, for a given frequency fs measured signal when the lower frequency measurement method fs1, fs2 by measuring the higher law of the better weeks.

2.2 Frequency of 8051 the scope of time and frequency measurement

8051 timer / counter interface, in a particular crystal frequency fc = 12 MHz when the frequency of input signal is the upper limit of fx ≤ fc/24 = 500 kHz. Such as frequency measurement method, the upper limit depends on the frequency 8051, the frequency measurement method of measuring range is:

8051 based on the frequency of measurement techniques

Namely: fx1 ≤ 500 kHz.

Frequency measurement method with frequency, the timer / counter counts the time interval 8051 may be a timer / counter completed divider 100 external circumstances, fx1 frequency range can be expanded to 50MHz

Design with test week, the lower limit of the frequency counter 8051 depends on the limit. 8051 taking into account the internal as 16, together with the TF flag, count range of 217, so its time for the largest count 8051 based on the frequency of measurement techniques Seconds. If using a semi-period measurement, the measurement frequency range is:

8051 based on the frequency of measurement techniques

Law in determining the week, the standard frequency signal fs2 from time to time by the 8051's internal structure, f s2 Constant for fc/12, therefore, in a given ε0 for 0.0 1, fx2 both the upper limit of a certain frequency, the lower limit of a certain frequency . Namely:

8051 based on the frequency of measurement techniques

And it can be seen to draw: 4Hz ≤ fx1 ≤ 10 kHz can be achieved theoretically infinite, that is, low-fs1 can reach infinity, therefore, fx1 infinitesimal can be achieved, it can be considered frequency range frequency measurement method, only the upper limit frequency, there is no lower limit frequency. And then this way, the scope of the two frequencies can be superimposed with the frequency range of measurement frequency: 4 Hz ≤ fx1 ≤ 50 MHz. Accuracy can be achieved 1Hz. From the above analysis we can see that the frequency measurement method a wide frequency coverage, and in the high-frequency side of the higher measurement accuracy, and in the low-frequency low measurement accuracy, while a longer measurement time. Measuring the frequency of measurement-week coverage of narrow-band measurements in high-precision low in the low frequency band higher measurement accuracy, measurement time is short. Therefore, the frequency measurement method for high-frequency signal measurement method for measuring week low-frequency signal measurement.

8051 software can be used to control the timer / counter work in order to achieve the frequency measurement method and measurement of the dynamic switch-week law. Of broadband, high-speed measurement of the frequency can be used to switch measurement software to improve measurement accuracy and measurement speed. Its frequency measurement circuit as shown in Figure 2.

8051 based on the frequency of measurement techniques

3 Software Design

As shown in Figure 2 by the frequency measurement circuit, we can see that wave after 74LS132 Schmitt trigger, and then can be amplified by the plastic into a square wave, and then use 8051 timer / counter T0 timing given time 10 ms, re-use 8051 timer / counter for counter T1, a total of 10 ms after the time of the Schmitt trigger square wave signal of the 74LS132. When over 10 ms from time to time T0, when, T0 interrupt to the CPU interrupt signal to the application and frequency measurement. Assumptions set by the intermediary frequency l00/10 ms = l00 × 100 = 10000 Hz = 10 kHz, dugang for fx = N / T, therefore, can be assumed that a given value of 100 compared with the Tl, and then counter-ri Tl of the numerical value and a given comparison. As the frequency measurement method with frequency, the smaller the frequency of errors (± l error). So, here the frequency of l0 kHz as an intermediary, the ± 1 error is 9.9 kHz and 1 0.1 kHz, the error rate of 1%, showing that the error is not great, but also be acceptable.

In fact, when the frequency is less than 1 0kHz comparison, if the procedure of choice in terms of measurement cycle. Flow chart of the measurement method and procedure of weeks as shown in figure 3.

8051 based on the frequency of measurement techniques

4 Concluding remarks

This article introduced through the design process to achieve the frequency measurement requirements, and be able to complete the measurement results very good storage, fully able to achieve the desired effects.

Micro Controller Unit Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.