外文翻译--基于单片机的信号发生器的设计(适用于毕业论文外文翻译+中英文对照).doc_第1页
外文翻译--基于单片机的信号发生器的设计(适用于毕业论文外文翻译+中英文对照).doc_第2页
外文翻译--基于单片机的信号发生器的设计(适用于毕业论文外文翻译+中英文对照).doc_第3页
外文翻译--基于单片机的信号发生器的设计(适用于毕业论文外文翻译+中英文对照).doc_第4页
外文翻译--基于单片机的信号发生器的设计(适用于毕业论文外文翻译+中英文对照).doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

The design of microcontroller-based signal generatorHuang 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 waveform 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 generator. 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 analog 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 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, 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 control 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 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 wave1 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 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 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 computer 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 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 generator, 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, system 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 signal 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 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 amplitude 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 the 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 Design2.1 program: AT89C52 microcontroller programming method to produce sawtooth, sine wave, square wave 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 requirements1), the use of single-chip software design produces three waveforms2), three waveforms can be selected via the keyboard3) The waveform frequency is adjustable4), need to display the waveform types and frequency2.2 device selection1 by the MCU to control the D / A output three kinds of waveforms. AT89C52 microcontroller is a high-performance 8-bit single chip microcomputer. Which constitute the computers central processing unit CPU, memory, registers, the I / O interface to production in an integrated circuit chip, which constitute a relatively complete computer, and its cheap.3, the LCD monitor 1602. Its power is small, the effect is obvious, and display the programming is easy to control, you can display the letters.2.3 The overall system design The system uses a microcontroller as the data processing and control of the core by the MCU to complete the man-machine interface, system control, signal acquisition and signal processing and transformation, using keystrokes, use the LCD display of the circuit output digital program. The design task is broken down into key circuits, liquid crystal display circuit modules. Figure 2-1 shows the overall block diagram of the system2.4 Hardware Implementation and unit circuit design2.4.1 of the smallest single-chip system design The 89C52 chip, ROM / EPROM MCU, this chip constitute the minimum system simple, and reliable. Constitute the minimum application system using the 89C52 microcontroller connected to the clock circuit and reset circuit can be shown in the Figure 89C51 microcontroller minimum system. Due to the limit of integration, the minimum application can only be used as a small control unit. Its application features:(1) available to users of a large number of I / O port lines.(2) Internal memory capacity is limited.(3) application development is unique. The standard 52 for the 8K program space, 128 bytes of RAM, 32 ports, five interrupts, two timer / counter, 12 clock cycles to execute a basic instruction, the division of the longest for 48 cycles. 52 for the 8K program space, and 256 bytes of RAM, 32 ports, six interrupt, three timer / counters.2.4.2 D / A converter The DAC0832 is a dual in-line 8-bit D / A converter. Able to complete the digital input to analog output (current) conversion. Figure 3.5 shows the pin diagram of the DAC0832. Its main parameters are as follows: resolution of 8, the conversion time of 1s, full scale error of 1LSB, the reference voltage (+10 / span -10) V, power supply (+5 to +15) V logic level inputs compatible with TTL. Be seen from Figure 3-1, the DAC0832 in two latches the first latch is called the input register, it allows the latched signal as ILE, the second latch called the DAC register, it the latch signal is also referred to as a channel control signal / XFER. Figure 2-3, when the ILE is high, the chip select signal / CS and the write signal / WR1 is low, the input register control signal, in which case, the output of the input register with the input changes. Thereafter, when the high / WR1 low, the control signals become low at this time, the data is latched into the input register, input register output is no longer with the change of the external data DB.The second stage latch transfer control signal / XFER and write signal / WR2 at the same time is low, the two latch control signal is high, the output of the 8-bit DAC register with the input, then when / WR2 from low, the control signal goes low, so the input register is latched into the DAC register.Figure 2-3 the rest of the pin function defined as follows:(DI7 DI0 in: 1) 8-bit data input, DI7 highest.(2) IOUT1: analog current output terminal 1, when the data in the DAC register are all 1, the maximum output current, the DAC register data are all 0, the output current is 0.(3) IOUT2: analog current output, IOUT2 and IOUT1 and is a constant, that is IOUT1 the + IOUT2 = constant.(4) the RFB: feedback resistor terminal of DAC0832 internal feedback resistor, RFB-side can be directly connected to an external op amps output, this is equivalent to a feedback resistor connected to the op amp output and input .(5) VREF: Reference voltage input, this end can be connected to a positive voltage can be accessed by a negative voltage, which determines the 0-255 digital transforming the amplitude of the analog voltage values, VREF range (+10 -10) V. Resistor network connected to the the VREF side and D / A internal T-shaped.(6) Vcc: chip supply voltage range of (+5 - 15) V.2.4.3 op amp circuit Figure 2-4, R1 is coupled to resistors, R2, R3, resistor voltage divider feedback. R2 and R1, the voltage ratio of 1:2, for OUT2 voltage of-5v 0v in the second op amp in the make-5v 0v between the voltage change-5v to 5v, the first op amp convert the amount of voltage values did not increase or decrease the 1v, the second stage op amp voltage decrease or increase of 2v.2.4.4 LED display interface circuit Commonly used in LED display LED status display (commonly known as light-emitting diode) LED seven-segment display (commonly known as the digital control and LED 16 segment display, LED display two states, for the system; digital tube for digital display; LED 16 segment display, for the character display)A. Digital control structure Digital tube consists of eight light-emitting diode (hereinafter referred to as fields), different combinations can be used to display the numbers 0-9. Characters AF and the decimal point . Digital tube is divided into two common cathode and common anode structure.Digital pipe works Total anode 8 digital tube light emitting diode anode (diode positive terminal) connected together. Usually common anode connected high a general power supply when a cathode connected to low, the digital tube conduction and light. A total of eight light-emitting diode digital cathode tube cathode (diode negative terminal) connected together. Public cathode connected to low (ground) when an anode connected to high, the digital tube light.2.4.5 Waveform Generation Principle and module design1 First, the digital value of the stored waveform memory array tosin;52 microcontroller to read the value in the array into the D / A converter;3, D / A converter input digital value is converted to analog output;4, the D / A analog output electric current through the op amp to convert the voltage output.Three waveforms generated by the microcontroller programming method through the DA converter module DAC0832 output into the filter wave amplification. Schematic 2-6 as follows:2.4.6 the design of the display module LCD 1602 display the output waveform, frequency, the circuit diagram. As shown in Figure 2-7, the 1602 data of the eight termination microcontroller P1 port, its three P3.2-P3.4 can end RS, RW, E, respectively, then the microcontroller. Through software control of the LCD screen can display the waveform types and frequency of the waveform.Conclusions The curriculum design allows me to deepen and improve the theoretical knowledge learned on the course. And through the course design, so that I understand and master microcomputer application system software and hardware design process, methods and implementation, training me to analyze problems and problem-solving skills, to lay a good foundation for the future design and implementation of the more difficult applications. At the same time trained me to write the design specifications. In the design process, I found a lot of problems before done such a design, but this design really made me grow a lot. Single-chip design, the hardware circuit is relatively simple, mainly is to solve the problem of program design, program design is a very flexible thing, it reflects you solve the problem of logical thinking and innovation capability, it is the soul of a design lies. Therefore, most of the time throughout the design process is used in the program above. Many subroutines can learn from books, but how the convergence of each subroutine is the key problem, which requires very familiar with the structure of the microcontroller. Therefore we can say that the single chip design is a combination of software and hardware, the two are inextricably linked. To design a successful circuit, must be patient, there must uphold the determination. , Spend the most time on the details of the design of each unit circuit connections and circuits, such as the choice of a variety of programs, we carefully compare the analysis of the principle as well as possible reasons for the circuit design process. This requires a full and thorough understanding and research, and the various component parts of the hardware system of flexible applications. Books of theoretical knowledge on the basis of the design is complete, I have a deeper understanding. The design process at the same time, I also learned to efficient data access, using reference books, use the Internet to find information. I found in the books we use have some knowledge in practical applications is not very satisfactory, various parameters need to adjust. Occasionally will encounter incorrect information to the phenomenon, which requires that we should pay more attention to the Practice. Deep understanding of the theory applied in practice, through the waveform on the computer, know and understand the theory in the computer how to perform the application of this theory in practice a deeper understanding, and inspired my enthusiasm for learning in the design of this course, I was through the course design, a comprehensive system to understand the basic method of the general principles of compiler principle course of the program structure. Rigid textbook knowledge becomes interesting, inspired my enthusiasm for learning.References1 A wearing fairy gold editor of 51 single-chip C language assembler development instance of Tsinghua University Press, 20082 High auspicious editor of the National Undergraduate Electronic Design Contest Training Series tutorial Electronic Industry Press, 20073 salicin line editor of Analog Electronics Concise Guide to Higher Education Press, 20074 Jiang Huiping editor Microcontroller Theory and Application Design of Beijing University of Aeronautics and Astronautics Press, 2007基于单片机的信号发生器的设计黄鹏勇(湄洲湾职业技术学院,福建 莆田 351254)摘 要波形发生器即简易函数信号发生器,是一个能够产生多种波形,如三角波、锯齿波、方波、正弦波等波形电路。函数信号发生器在电路实验和设备仪器中具有十分广泛的用途。通过对函数发生器的原理以及构成分析,可设计一个能变换出三角波、锯齿波、方波、正弦波的函数波形发生器。在工业生产和科研中利用函数信号发生器发出的信号,可以对元器件的性能及参数进行测量,还可以对电工和电子产品进行指数验证、参数调整及性能鉴定。常用的信号发生器绝大部分是由模拟电路构成的,当这种模拟信号发生器用于低频信号输出往往需要的RC值很大,这样不仅参数准确度难以保证,而且体积和功耗都很大,而由数字电路构成的低频信号发生器,虽然其性能好但体积较大,价格较贵,因此,高精度,宽调幅将成为数字量信号发生器的趋势。本文介绍的是利用89C52单片机和数模转换器件DAC0832产生所需不同信号的低频信号源,其信号幅度和频率都是可以按要求控制的。文中简要介绍了DAC0832数模转换器的结构原理和使用方法,89C52的基础理论,以及与设计电路有关的各种芯片。文中着重介绍了如何利用单片机控制D/A转换器产生上述信号的硬件电路和软件编程。信号频率幅度也按要求可调。本设计核心任务是:以AT89C52为核心,结合D/A转换器和DAC0832等器件,用仿真软件设计硬件电路,用C语言编写驱动程序,以实现程序控制产生正弦波、三角波、方波、三种常用低频信号。可以通过键盘选择波形和输入任意频率值。关键词: AT89C52单片机 函数波形发生器 DAC0832 方波 三角波 正弦波1 引言单片机是一种集成在电路芯片,是采用超大规模集成电路技术把具有数据处理能力的中央处理器CPU随机存储器RAM、只读存储器ROM、多种I/O口和中断系统、定时器/计时器等功能(可能还包括显示驱动电路、脉宽调制电路、模拟多路转换器、A/D转换器等电路)集成到一块硅片上构成的一个小而完善的计算机系统。波形发生器是一种数据信号发生器,在调试硬件时,常常需要加入一些信号,以观察电路工作是否正常。用一般的信号发生器,不但笨重,而且只发一些简单的波形,不能满足需要。例如用户要调试串口通信程序时,就要在计算机上写好一段程序,再用线连接计算机和用户实验板,如果不正常,不知道是通讯线有问题还是程序有问题。用E2000/L的波形发生器功能,就可以定义串口数据。通过逻辑探勾输出,调试起来简单快捷。基于单片机的简易波形发生器是一种常用的信号源,它广泛地应用在电子技术实验、自动控制系统和其他科研领域。目前, 简易波形发生器的构成方法有很多,例如采用DDS(Direct2Digital Synthesis)型的任意波发生器、采用专用的信号发生芯片MAX038以及传统的AWG 。本设计源于2007年全国大学生电子制做大赛,通过分析比较后采用传统的方法来实现多功能波形发生器。借助高性能单片机运算速度高,系统集成度强的优势,设计的这种信号发生器,比以前的数字式信号发生器具有硬件简单,理解及实现起来较容易,该方案的设计思路较为清晰,且容易对频率和幅值进行控制等优点。低频信号发生器采用单片机波形合成发生器产生高精度,低失真的正弦波电压,可用于校验频率继电器,同步继电器等,也可作为低频变频电源使用。 以单片机为核心设计了一个低频函数信号发生器。信号发生器采用数字波形合成技术,通过硬件电路和软件程序相结合,可输出自定义波形

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论