Application of C8051F320 in frequency source test

Publisher:梦回归处Latest update time:2011-08-29 Keywords:C8051F320 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
Frequency source, as the name implies, is a source that generates reference frequency points. It is a very important component in many industrial and even military fields. In order to conveniently monitor and test the output of the frequency source. This article gives a specific method for designing frequency source test equipment and its tooling using C8051F320. This design can not only save labor, but also make work more efficient and convenient.


1 Analysis of direct analog frequency source
Since this design is mainly aimed at direct analog synthesis frequency source, we will first introduce the direct analog frequency source. The basic principle of direct analog frequency source is relatively simple. It uses a highly stable crystal oscillator to obtain the required frequency by dividing, multiplying, mixing, filtering and amplifying the crystal oscillator frequency. Its principle block diagram is shown in Figure 1.

As can be seen from Figure 1, if you want to control the output of the frequency source, you only need to control the output of the frequency selection unit. The following briefly introduces the frequency selection unit of the direct analog synthesis frequency source. In this structural frequency source, the frequency selection unit can generally be composed of a switch filter component. Figure 2 shows a block diagram of the frequency selection unit. Combined with Figure 2, it can be seen that this type of frequency source controls the TTL level according to a certain timing sequence, and then controls the switch filter component, and finally outputs N frequency points. Most of the control tools used in the debugging of many frequency sources are usually implemented using a dial circuit. Although the dial circuit is simple and convenient, the test and monitoring are relatively complicated and must be operated manually. In this way, when there are too many frequency points, it is easy to make mistakes or misses if you are not careful, and you often have to retest.

2 Solution Design
2.1 Test Circuit Design
In response to the above problems, the author used C8051F320 to design a test fixture that integrates frequency automatic control, manual control and display, and used LED as the display circuit design. For C8051F320, it is relatively easy to achieve automatic control. The specific test circuit is shown in Figure 3.

In Figure 3, the on and off of the S2 switch can set the system to automatic test mode or manual test mode. When the S2 switch is closed, it is in automatic test mode; when the S2 switch is open, it is in manual test mode. In automatic mode, the C8051F320 uses a system timer to control the I/O port according to the time interval set by the program, so that it can output specific high and low levels in sequence to control the output of the 38 decoder, thereby realizing the automatic output of all frequency points in sequence. [page]

At the same time, the display circuit will synchronously display the number of points. This design uses two 38 decoders to control the output of the four-throw switch and the five-throw switch respectively. In this radar system, combined with actual work experience, the time interval is set to 8 seconds. In this way, when automatic control is selected, the test fixture will output the frequency points one by one at an interval of 8 seconds without any errors, and the tester will have sufficient time to monitor and record the data; in manual mode, the AD sampling method is adopted, and a knob potentiometer is connected to the V_ADIN input terminal. The C8051F320 controls the I/O port by collecting the changes in the output voltage of the potentiometer, and then controls the 38 decoder to select the current output frequency point.
2.2 Display circuit design
Figure 4 shows the display circuit diagram of this design, through which the required frequency point can be quickly selected. The following is a brief introduction to the display circuit. Here, the output frequency point number is two as an example. In actual applications, the circuit shown in Figure 4 can also be slightly modified according to actual needs.

The display circuit adopts LED dynamic display. The system can control the output level of the I/O port by programming C8051F320, and connect the control signal to the bus driver D4. Here, the bus driver can choose 74LS244 to enable the LED to realize dynamic display. In the dynamic display, it can be refreshed every 5 ms by the system setting. The introduction of the display circuit can not only ensure that all frequency points are monitored in the automatic test mode, but also quickly select a specific frequency point in the manual test mode.
2.3 Test software design
The test software can adopt a modular structure design, so that each functional module subroutine is independent of each other, easy to debug and maintain. The entire software is divided into the main program, manual function module and automatic function module subroutine. The program design can use the multi-threading idea to decompose the implemented functions into three main tasks: A/D sampling, automatic output and peripheral display. Among them, A/D sampling is controlled by numerical judgment. When the collected voltage reaches a certain value, the corresponding frequency point is output; the automatic output is mainly completed by the timer. When the time interval reaches the system set 8 s, the next frequency point to be tested is automatically output. The main program mainly completes the system initialization, and then executes the subprograms cyclically. Figure 5 shows the program flow chart of this system.

3 Conclusion
This article describes the application of C8051F320 in frequency source testing. Combined with the test principles of this article, or with slight modifications as needed, it can be used for a variety of frequency sources and even other fields. The introduction of the C8051F320 microcontroller can effectively avoid human errors, greatly improve work efficiency, and is extremely practical.

Keywords:C8051F320 Reference address:Application of C8051F320 in frequency source test

Previous article:Design of a 2 Gsps digital oscilloscope data acquisition system
Next article:Measuring Special Signals Using Digital Storage Oscilloscope

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号