Design of Arbitrary Waveform Generator Based on CPLD and AT89C52

Publisher:legend8Latest update time:2016-10-25 Source: elecfansKeywords:CPLD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
introduction

In electronic engineering design and testing, some complex signals with special requirements are often needed, requiring that their waveforms can be generated arbitrarily and the frequency can be easily adjusted. It is difficult for ordinary signal generators to meet the requirements, and the arbitrary signal generators sold on the market are expensive. In combination with actual needs, we designed an arbitrary waveform generator. In the circuit design, the simulation function of MATLAB is fully utilized to complete the generation, sampling and analog-to-digital conversion of the desired waveform signal in MATLAB, and the obtained digital waveform data is stored in the data storage device. Through the control of the single-chip microcomputer and CPLD, the waveform data is read out and sent to the backward channel for A/D conversion and amplification to obtain the required analog signal waveform. The arbitrary waveform generator designed by the above method has flexible and convenient signal generation, flexible function expansion, and adjustable signal parameters, realizing the software design of hardware circuits. It has the advantages of simple circuit structure, strong practicality, and low cost.


System Block Diagram

The design idea of ​​the arbitrary waveform generator is to use the powerful simulation function of MATLAB to conveniently and quickly generate arbitrary waveform data of given frequency, period, and pulse width; and pre-store the data in the data memory. Under the control of the single-chip microcomputer, the CPLD circuit is used to generate the address read data, which is sent to the D/A conversion circuit to obtain the required arbitrary waveform signal. The system structure block diagram is shown in Figure 1; the frequency division circuit and address generator in the figure are implemented by CPLD.


Click on the picture to open it in a new windowRelated pictures for this topic are as follows:

Design of arbitrary waveform generator based on CPLD and AT89C52 - yongshengdianzi - Yongsheng Electronics Yongsheng My Professional Blog

Figure 1 System Block Diagram

Circuit design and implementation


Single chip control circuit

The single-chip microcomputer uses AT89C52 chip, and generates the required control signal through software programming. The main control parameters include: signal period, pulse width; start signal of frequency division circuit, reset signal of address generator; selection signal of E2PROM; selection signal of D/A conversion circuit. In the specific circuit, port P1.0 controls the start of frequency division circuit, P1.1 controls the reset of address generator, and P2.0 controls the selection signal of 28C256 and AD7545. The single-chip microcomputer works in timer 0 mode, and the software design is implemented in C language. The flow chart is shown in Figure 2.


Click on the picture to open it in a new windowRelated pictures for this topic are as follows:

 

Design of arbitrary waveform generator based on CPLD and AT89C52 - yongshengdianzi - Yongsheng Electronics Yongsheng My Professional Blog

Figure 2 Software Flowchart

Waveform data generation

As an excellent mathematical tool software, MATLAB has powerful computing functions. It can easily generate various signal waveforms and realize the generation, sampling and analog-to-digital conversion of waveform signals in the software. The designed arbitrary waveform generator uses 28C256 chip as the data storage device. The signal waveform is generated by MATLAB simulation. The obtained waveform data is stored in the data storage device 28C256. In the specific design, we require the generation of a single/FM mixed signal with a period of 200ms and a pulse width of 5ms. The pulse width of the single frequency signal is 4ms and the frequency is 30KHz; the pulse width of the FM signal is 1ms and the frequency is 30KHz_35KHz. The sampling rate is set to 500KHz in MATLAB, and 2500 waveform data are obtained. In the process of burning these mixed waveform data into the data storage device, due to the large amount of waveform data, it is not only time-consuming and error-prone to directly enter the data storage device manually. In order to overcome this drawback, the generated waveform data is stored in the INTEL format of the HEX file through MATLAB programming, and then these waveform data are burned into the data storage device in batches. By adopting the above method, waveform data generation is simple and fast; signal parameters can be conveniently modified in the software program as needed; and functional expansion of signal parameters can be achieved without changing the hardware circuit.

CPLD Logic Design

The frequency division circuit is implemented by two 74HC163 chips. Through the frequency division circuit, the 12MHz crystal oscillator standard frequency is divided to obtain a 500KHz sampling frequency, which is used as the clock of the address generator. The operation of the frequency division circuit is controlled by a single-chip microcomputer.

The address generator circuit is composed of three 74HC163 chips, with a clock frequency of 500KHz, provided by a frequency division circuit; it is consistent with the sampling frequency of the pre-stored waveform data to achieve distortion-free reading of the data.

In the circuit design, the EPM7128AETC100-10 chip of ALTRA Company is used to complete the frequency division and the PLD circuit design in the MAX+PLUSⅡ development environment. Most of the small and medium-scale integrated circuits and discrete components can be omitted, making the circuit have the significant advantages of high integration, fast working speed, convenient programming and low price. Through the signal realization method of CPLD and data pre-generation, the signal parameters can be adjusted arbitrarily without changing the hardware circuit; at the same time, the peripheral circuit is very simple, which brings convenience to engineering debugging and application.

D/A conversion circuit

The implementation of the D/A conversion circuit is shown in Figure 3. In the circuit, AD7545 converts waveform data into analog signals; LF353 performs signal filtering and shaping.


Click on the picture to open it in a new windowRelated pictures for this topic are as follows:
Design of arbitrary waveform generator based on CPLD and AT89C52 - yongshengdianzi - Yongsheng Electronics Yongsheng My Professional Blog

Conclusion

The arbitrary waveform generator designed by the above method, through the combination of software and hardware, gives full play to the powerful simulation function of MATLAB and reduces the hardware cost as much as possible. According to actual needs, it can generate a variety of waveforms such as sine wave, triangle wave, sawtooth wave, square wave, etc. It can generate a variety of waveform parameters such as linear frequency modulation signal (LFM), single frequency pulse signal (CW), cosine envelope signal and their combination signals; it meets the needs of engineering. The arbitrary waveform generator has been applied to the ongoing project "underwater moving target trajectory measurement" with good results.

 

Design of arbitrary waveform generator based on CPLD and AT89C52 - yongshengdianzi - Yongsheng Electronics Yongsheng My Professional Blog

Keywords:CPLD Reference address:Design of Arbitrary Waveform Generator Based on CPLD and AT89C52

Previous article:Ward Calling System Based on Low Voltage Power Line Carrier Technology
Next article:51 MCU --- Timer/Counter

Recommended ReadingLatest update time:2024-11-15 13:35

Research on CPLD Software Update Scheme Based on DSP
  In the process of modern navigation computer systems developing towards miniaturization, navigation computer systems implemented with high-performance digital signal processors and programmable logic devices have high performance advantages. In the embedded micro navigation computer system based on floating-point DS
[Embedded]
Research on CPLD Software Update Scheme Based on DSP
AT89C52 MCU Proteus Simulation Music Player Operation Steps
Many beginners don't know how to use the Proteus simulator to make a music player. Although the function is simple, it is difficult for beginners to get started. I will post the simple process and source files here for beginners to learn. Operation steps: 1. Create a new project 2. Add components according to the
[Microcontroller]
AT89C52 MCU Proteus Simulation Music Player Operation Steps
ATMEL MCU, CPLD Download Line Hardware Introduction
introduce This application document describes the Atmel? ATMEL MCU, CPLD download line interface; the interface for online programming of AT89SX microcontroller using AT89SISP programmer. AT89ISP software Atmel's online programming software has been provided for download on our website. For specific operation method
[Microcontroller]
ATMEL MCU, CPLD Download Line Hardware Introduction
Design of LED display screen control circuit based on CPLD
In recent years, with the rapid development of computer technology and integrated circuit technology, the most widely used large-screen display system is the video LED display system. In LED display technology, the brightness, light effect and color difference of red and green light-emitting diodes have been greatly
[Power Management]
Design of LED display screen control circuit based on CPLD
Design of infrared temperature monitoring system based on C8051F340 single chip microcomputer and CPLD
0 Introduction     During the spiral charging process, bubbles often appear in the medicine due to the uneven temperature distribution of the internal medicine, which seriously affects the quality of the medicine in the projectile and the parameters of the ammunition. Therefore, this paper hopes to detect the temperatu
[Microcontroller]
Design of infrared temperature monitoring system based on C8051F340 single chip microcomputer and CPLD
Electromagnetic trigger controller based on CPLD
introduction The firing of firearms is an important link in the field of shooting range testing. Traditional firearms are fired manually, that is, the shooter pulls the trigger of the firearm manually after hearing the shooting command. This method has two problems: First, safety cannot be guaranteed. When operating
[Test Measurement]
Electromagnetic trigger controller based on CPLD
Design of MCU CPLD Transformer Test System
1 Introduction BX signal transformer , BG track transformer and ZG silicon rectifier are the front end of railway signal electrical equipment. Their working stability and accuracy are directly related to driving safety. Reliable detection of transformer is the first step to strictly control quality. For manufacturers
[Power Management]
Design of MCU CPLD Transformer Test System
Latest Microcontroller 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号