1、 The design of microcontroller-based signal generator Huang Pengyong (Meizhou Bay Vocational Technical College, Putian, Fujian, 351 254) Abstract Waveform generator, a simple function signal generator, a produce a variety of waveforms, such as the triangle wave, sawtooth wave, square wave, sine wave
2、form circuit. Function signal generator circuit experiments and equipment, instruments with a wide range of uses. By the principle of the function generator, as well as structure analysis, can be designed one can transform the triangle wave, sawtooth wave, square wave, sine function waveform generat
3、or. Function signal generator signals in industrial production and scientific research to measure the performance and parameters of the components, electrical and electronic products index validation, parameter adjustment, and performance appraisal. Most of the commonly used signal generator by an a
4、nalog circuit, this analog signal generator for low-frequency signal output often requires the RC value, so that not only the parameters of accuracy is difficult to guarantee, but the size and power consumption are large by the digital circuit composed of low-frequency signal generator, although its
5、 performance is good, but larger, more expensive, high-precision, wide amplitude modulation will become the trend of the digital signal generator. This article describes the 89C52 microcontroller and digital to analog converter DAC0832 to produce the desired signal of the low frequency signal source
6、, the signal amplitude and frequency can be controlled as required. The article briefly describes the structure of principles and use of the DAC0832 digital-to-analog converter, the 89C52 basic theory and design of circuits a variety of chips. The paper focuses on how to use microcontroller to contr
7、ol the D / A converter to produce the hardware and software programming of the above signals. The signal frequency range is also adjustable as required. The core of the design tasks are: AT89C52 as the D / A converter and DAC0832 devices, circuit simulation software, design hardware drivers written
8、in C, in order to achieve process control to produce sine wave, triangle wave, square wave, three commonly used low-frequency signals. Waveforms and enter any frequency value can be selected via the keyboard. Key words: on AT89C52 function waveform generator DAC0832 square wave, triangle wave, sine
9、wave 1 Introduction SCM is an integrated circuit chip, VLSI technology with data processing capability of the central processing unit CPU random access memory RAM, read only memory ROM, and a variety of I / O port and interrupt system, timers / timer other functions (which may also include a display
10、 driver circuit, pulse width modulation circuit, analog multi-channel converter, A / D converter and other circuit) integrated into a silicon constitute a small computer system. The waveform generator is a data signal generator, in the debugging of hardware, we often need to add some signal, whether
11、 it is normal to observe circuit operation. General signal generator, not only cumbersome, but only made a few simple waveform, can not meet the need. Example, when users want to debug serial communication program, it is necessary on the computer to write a program, and then wire to connect the comp
12、uter and the user target board, if not normal, do not know that the communication lines have a problem or a problem with the program. E2000 / L waveform generator capability, you can define the serial data. Output logic probe hook, quick and easy to debug. Based on a simple waveform generator of the
13、 microcontroller is a common source, is widely used in the experiment of electronic technology, automatic control system and other scientific fields. At present, the composition of simple waveform generator There are many ways, such as type of DDS (Direct2Digital Synthesis) arbitrary waveform genera
14、tor, using a dedicated signal chip MAX038 AWG. The design stems from the 2007 National Undergraduate Electronic system to contest, through analysis and comparison with traditional methods to achieve the multi-function waveform generator. With high-performance single-chip high speed of operation, sys
15、tem integration, strong advantages, the design of this signal generator, digital signal generator than the previous hardware is simple to understand and implement easier, clearer design ideas for the program, and easy to control and the advantages of the frequency and amplitude. The low-frequency si
16、gnal generator with the synthesis of single-chip waveform generator to produce high-precision, low distortion sine wave voltage can be used for the calibration frequency relays, synchronization relays, etc. can also be used as a low-frequency inverter power supply. Microcontroller as the core design
17、 of a low frequency function signal generator. Signal generator with digital waveform synthesis techniques, through a combination of hardware circuitry and software programs can output custom waveforms such as sine, square, triangle spread to other arbitrary waveform. Waveform frequency and amplitud
18、e can be arbitrarily changed within a certain range. Waveform generation principle, hardware and software part of the design principles. MCU control the D / A converter to produce signals above hardware and software programming, of DAC0832 D, / A converter principle and use, AT89C52 and related to t
19、he design of the circuit chip, on different low-frequency signal source design. The signal generator has the advantages of small size, low price, stable performance, fully functional. 2 System Design 2.1 program: AT89C52 microcontroller programming method to produce sawtooth, sine wave, square wave
20、three waveforms, and then through the D / A converter DAC0832 digital signal converted to analog signals, filtered and amplified, and ultimately by the oscilloscope display, and keyboard to control three types of waveforms of the frequency changes, the final output shows the type and value. Design requirements 1), the use of single-chip software design produces three waveforms