Realization of analog signal waveform based on FPGA and analog circuit

Publisher:sdlg668Latest update time:2019-11-08 Source: eefocusKeywords:FPGA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1 Introduction

  Waveform generators have been widely used in various fields such as communication, control, and measurement. Waveforms such as sawtooth waves, sine waves, and square waves are often used in circuit design and debugging. With the rapid development of electronic technology, digitalization is gradually becoming the development trend of the electronics industry. Companies are expanding their products in the direction of digitalization, integration, and miniaturization. As we all know, digital electronic products have irreplaceable advantages, such as small size, high degree of integration, and strong anti-interference ability. However, digital circuits can only process pulse waveforms well, that is, they can only process square waves formed by 1 and 0 very well. They cannot process continuous and gradual signals well, which is exactly the advantage of analog circuits. This paper combines digital circuits with analog circuits, that is, FPGA is used to generate the control signals of various analog waveforms required, and then the analog circuit is used to process the gradual signals, so that various clear waveforms can be obtained.


  2 Oscilloscope Display Principle

  First, the display principle of the oscilloscope is briefly explained in order to better understand the working process of the hardware circuit. During the entire display period, the oscilloscope needs to be in the "XY" position, that is, the waveform of the oscilloscope is the superposition and synthesis of the input signals of the X-axis and the Y-axis. It can be seen that, in general, the variable input on the x-axis is the signal frequency, and the variable input on the y-axis is the signal amplitude. Therefore, when a signal frequency value of 5KHz is input on the x-axis and a DC voltage amplitude of 0V is input on the y-axis, a bright spot will be displayed at the position of (5KHz, 0V) on the oscilloscope; similarly, if a DC voltage amplitude of 5V is input on the y-axis and a signal frequency value of 0Hz is input on the x-axis, a bright spot will also be displayed at the position of (0Hz, 5V) on the oscilloscope; and if the inputs on the x-axis and the y-axis are 5KHz and 5V respectively, the bright spot will appear at (5KHz, 5V) on the oscilloscope. In this way, if the two coordinate axes are assigned values ​​continuously through the program, a clear and continuous signal waveform can be displayed on the oscilloscope.


  3 Hardware Design

  This article mainly introduces the simulation waveform design of step wave and sawtooth wave in common signals in detail. Their simulation circuits are simple to implement and the actual output waveform is clear. The hardware circuit in the scheme is mainly composed of DSP, FPGA and peripheral chips. DSP is used to control the output position and amplitude of the analog waveform; the peripheral chip is used to generate the analog waveform, such as using two DAC0832 to generate two voltage signals, one for controlling the height of the sawtooth wave and the other for controlling the height of the step wave. The FPGA performs the logic programming of various control signals required.


  Here, the FPGA uses ALTERA's 10K10 series of programmable logic devices. ALTERA's FLEX 10K series devices are the industry's first embedded programmable logic devices. They are flexible logic element array architectures that use a general gate sea architecture to implement general logic functions, and also use dedicated silicon chips to implement large-scale dedicated functions. Compared with standard gate arrays, since embedded functions are implemented on silicon chips, the required silicon chip area is smaller and the system speed is higher. The FLEX 10K series not only provides high density, high speed and system integration functions, but also contains multiple 32-bit buses and 6144 bits of RAM space in a single device. It also supports serial and parallel configurations and online simulation of JTAG mode. These features make the FLEX IOK series devices one of the most widely used programmable logic devices. Correspondingly, the development tool used is MaxplusⅡ programmable logic development software. Using MaxplusⅡ as an EDA software tool can achieve powerful logic functions, and also has the advantages of short cycle, high integration and reasonable price. Moreover, since the logic modules of the circuit are all implemented in FPGA, they have good portability and easy maintainability, and are convenient for future system improvements. At the same time, this further reduces the circuit board area and greatly improves the integration of the circuit. In this design, FPGA is mainly used to control and program various analog waveforms and generate various logics as control signals. The structural block diagram of the logic control in FPGA is shown in Figure 1, which can be divided into three parts, and the coarse sweep and fine sweep signals are used as control signals of sawtooth waves.

  Figure 1 Functional block diagram of the control signal module in FPGA


  The working process of FPGA is as follows: First, the input 32KHz clock signal is divided by the counter to generate a 1600Hz narrow pulse signal, which serves as the scanning trigger signal of the external analog waveform generation circuit on the one hand, and as the working start signal of the sawtooth wave control signal on the other hand, that is, every time the signal arrives, other functional modules are started to generate the required control signal according to the required timing. As shown in Figure 1, when the 1600Hz frequency arrives, the input clock (2MHz) of the fine scanning counter and the coarse scanning counter will be turned on, and the initial loading process of the two will be started. Then, the input pulse will be subtracted with this initial value. When the subtraction overflows, the output end will generate the required scanning signal. At the same time, the signal should be used to turn off the respective input clock signals until the next 1600Hz arrives. When the 8-bit initial value of the subtraction counter is changed through logical operation, the timing of the output signal will change accordingly relative to the 1600Hz signal. Through this logical method, the appearance time of various analog waveforms can be controlled, so that the display position of various waveforms on the oscilloscope can be controlled. Among them, the change of the initial value of the subtraction counter is realized through an 8-bit latch, that is, the DSP's address line, read/write signal line and I/O space access control line are logically operated as the selection signal of the 8-bit latch, and then the 8-bit data is written into the subtraction counter using the program.


  The step wave control signal is completely realized by software program, that is, different data is written into FPGA for latching at different times according to various timings, and then output through D flip-flop to control the generation of signal. In order to meet the needs of the system, a logic to control the change of waveform width is also designed to generate pulse sequences of different widths required for display. Its operation mode is to perform logical AND operation on two square wave signals of different frequencies and the output terminal D and D of a D flip-flop, and then perform logical OR operation, and then change the output state of the D flip-flop through the program, so as to obtain output pulses with two widths. 


  4 Experimental Results

  4.1 Step Waveform

  Here, the specific process of generating the step wave waveform is briefly introduced. First, it is necessary to design an analog circuit that can generate 4 different DC voltages, so that it can output DC voltages of different amplitudes under different control signal combination states. The analog circuit has a total of 4 control signal input terminals, and the input of the combination is controlled by the DSP software program. When the combination state is "0001", the circuit will output a DC voltage with an amplitude of 4V, and when the combination state is "0010", the circuit will output a DC voltage with an amplitude of 5V. At the same time, the corresponding output position must be given. In this way, when the program loop changes the input combination state, in the dual-trace display mode, the step wave waveform shown in Figure 2 can be obtained. When this waveform is input to the x-axis of the oscilloscope, four bright spots will appear at the corresponding positions of the oscilloscope.

  Figure 2 Step wave waveform


  In actual engineering, the conversion between two different pulse widths is performed in FPGA through DSP program. The signal of the required pulse width is set to an appropriate width through an external monostable trigger, and then passed through the differential and integral circuits to form a waveform as shown in Figure 3. This waveform is input to the Y axis of the oscilloscope and set to the "XY" gear, and finally four bright lines will be displayed. When the narrow pulse in Figure (a) is input to the Y axis, the program makes it stay at different amplitude points basically consistent, so that the corresponding bright lines will be more uniform; and when the wider pulse in Figure (b) is input to the Y axis, the program makes it stay at the highest amplitude point longer than at other amplitude points, which makes the top of the corresponding bright line brighter than the other parts of the bright line, and finally a bright line pattern similar to a match head will be displayed on the oscilloscope.

  Figure 3 Two widths of pulse signal


  4.2 Sawtooth Waveform

  Similarly, a sawtooth waveform can be generated according to the concept of interleaving. As can be seen from the above, the FPGA will output a 1600Hz pulse as the trigger signal of the external analog circuit. Under its action, the analog circuit will generate a scanning signal with a length of 100us, which will be used as the input signal of the X-axis on the oscilloscope, and the 0V DC voltage will be input to the Y-axis. Then, according to the display principle of the oscilloscope, since the input of the Y-axis is 0V, the bright spot can only appear on the x-axis, and the input signal of the x-axis is a continuous signal with a fixed frequency value, so a waveform with a continuous deduction baseline on the x-axis will be displayed on the oscilloscope. Then, the analog circuit is controlled by the DSP software program to generate a continuously changing DC voltage value, and when it is output to the Y-axis of the oscilloscope, a sawtooth waveform can be obtained on the oscilloscope, as shown in Figure 4.

[1] [2]
Keywords:FPGA Reference address:Realization of analog signal waveform based on FPGA and analog circuit

Previous article:Eliminate the impact of test equipment on device measurements
Next article:Oscilloscope signal rise time degradation

Recommended ReadingLatest update time:2024-11-22 13:55

Design of lane departure warning system based on FPGA
    Abstract: This paper introduces a lane departure warning system implementation scheme based on digital image processing technology and SOPC technology with FPGA chip as the core. The system completes the acquisition of the image in front of the vehicle through the CCD camera, realizes lane detection by using Houg
[Embedded]
Design of lane departure warning system based on FPGA
Lattice Launches Industry’s Lowest Power Speech Detection and Recognition Solution
    As small as 2.1 mm x 2.1 mm, the programmable voice detection and command recognition solution reduces power consumption by up to two-thirds compared to competing products.  Keeps the processing subsystem off to save system power until voice is recognized  Locks the owner’s voice-activated device to provide ne
[Internet of Things]
Improving Measurement Quality and Speed ​​with Oscilloscopes and User-Definable FPGAs
The demand for oscilloscopes is growing rapidly, and new research and test applications require more, faster, and more complex signals. This will require more intelligent test equipment to accurately detect specific signal conditions and avoid dead time, process data during acquisition to shorten test time, or quickly
[Test Measurement]
Improving Measurement Quality and Speed ​​with Oscilloscopes and User-Definable FPGAs
FPGA implementation method of secure communication system
introduction At present, the information security solution mainly focuses on taking a single measure to ensure the security of information. For various attack methods, the preventive measures are mainly concentrated on information encryption technology, security switch technology, firewall technology, a
[Embedded]
FPGA implementation method of secure communication system
FPGA-based SoC verification platform realizes circuit simulation and debugging
台湾工业技术研究院提出一种能够显著提升客制化 FPGA 原型板验证效率的创新方法,自动化现有的电路仿真(in-circuit emulation)侦错功能,并提供更高的FPGA能见度。这个以FPGA为基础的 SoC 验证平台对工研院而言是前景看好的崭新领域。 Case Study: High-Performance Multimedia SoC Platform This SoC design is a high-performance Android-compatible multimedia SoC platform. It is
[Embedded]
FPGA-based SoC verification platform realizes circuit simulation and debugging
Design of LED large screen control system based on MCU+FPGA
introduction If you take a look at the current market, you will find that most small and medium-sized LED display systems use traditional single-chip microcomputers as the main control chip. However, single-chip microcomputers with less internal resources and slower running speeds are difficult to meet the needs of
[Microcontroller]
Design of LED large screen control system based on MCU+FPGA
65nm Virtex-5 FPGA process
The most important feature of the semiconductor industry is the continuous advancement of technology, which is upgraded every few years on average, driving down power consumption and costs, and improving performance. From 180nm to 130nm, and then to 90nm, 65nm and 45nm, these slightly boring numbers are acceler
[Analog Electronics]
65nm Virtex-5 FPGA process
FPGA chip manufacturer Fudan Micro successfully passed the IPO on the Science and Technology Innovation Board
According to Jiwei.com news on March 31, according to the results of the 22nd review meeting of the Science and Technology Innovation Board Listing Committee in 2021 released by the Shanghai Stock Exchange, Shanghai Fudan Microelectronics Group Co., Ltd. (hereinafter referred to as: Fudan Micro) successfully passed th
[Mobile phone portable]
FPGA chip manufacturer Fudan Micro successfully passed the IPO on the Science and Technology Innovation Board
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号