Introduction
Arbitrary Wave Generator (hereinafter referred to as AWG) is widely used in communication systems, test systems and other aspects. This article uses the independently developed 150 MSPS (Million Sampling Per Second) 12-bit DAC (Digital Analog Converter) and 300MSPS 12-bit DAC to design an AWG based on CPLD technology. The waveform to be generated is set through the host computer software, and then the waveform data is downloaded to the AWG. Under the high-speed control circuit of the CPLD, the AWG sends the waveform data to a high-speed DAC for conversion to form the desired waveform. Let’s first analyze the hardware structure of AWG.
? The working process of
the hardware structure of the arbitrary waveform generator
AWG is to first receive the waveform digital signal sent from the host computer and store it in the SRAM, and then start the control circuit to take out the data from the SRAM and send it to the DAC for digital-to-analog conversion, and the converted analog signal is sent to the low Pass filter to form waveform. If the DAC works at a speed of 150MSPS, it can send data to the DAC at a frequency of 150MHz for conversion. The crystal oscillator input of the microcontroller generally works below 40MHz and cannot send data to the DAC at such a high speed, so consider using CPLD to build hardware control. circuit. The data is first transferred to the SRAM, and then under the control of the CPLD hardware control circuit, the data is taken from the SRAM and sent to the DAC for conversion at a frequency of 150MHz. Its architecture is shown in Figure 1. If you want to form a sinusoidal periodic signal, 4 points per cycle can be synthesized into a waveform, and a high-frequency signal of about 38MHz can be output at this time.
?
Figure 1 AWG hardware structure
CPLD (Complex Programmable Logic Device, complex programmable logic device) is developed on the basis of traditional PAL and GAL. It has multiple working modes and obvious advantages such as high integration, high speed and high reliability. Features, it has a very wide range of applications in ultra-high-speed fields and real-time measurement and control. Compared with FPGA, CPLD is more suitable for I/O-intensive applications such as computer bus control, address decoding, complex state machines, timers/counters, and memory controllers. It does not require external configuration ROM and has predictable delays. Current CPLDs are generally based on E2PROM and Flash electrically erasable technology, which can achieve cyclic erasing and erasing. Altera's MAX7000 CPLD is equipped with a JTAG port and supports ISP programming. Programs designed with VHDL or Verilog HDL (Hardware Description Language, Hardware Description Language) use EDA tools to undergo behavioral simulation, functional simulation and timing simulation, then generate a netlist through a synthesis tool and download it to the target device to generate a hardware circuit.
In this device, the CPLD uses Altera's EPM7128AE [4], whose maximum operating frequency reaches 200MHz. The microcontroller adopts Atmel's AVR microcontroller AT90S8515[2]. Its main features are: enhanced RISC architecture CPU, 8K Flash, 512-byte EEPROM, 512-byte Internal SRAM, UART, SPI, wide voltage range: 2.7 -6.0V. SRAM uses 64K x 16 CY7C1021V.
The following analyzes the CPLD control circuit.
CPLD circuit design
CPLD is mainly responsible for fetching numbers from SRAM to DAC at a high speed (150MHz). Its core circuit is a 13-bit counter. The size of the waveform data file is 8Kbytes. If you want to expand the size of the waveform file, you can increase the address counter capacity of the CPLD as needed. The DAC control circuit constructed inside the CPLD is shown in Figure 2. Its control process is analyzed below.
PA[15:0] is connected to the two 8-bit parallel ports of AT90S8515; D[15:0] is connected to the SRAM data lines D0-D15; AD[12:0] is connected to the SRAM address lines A0-A12; DB[15: 0] Connect to D0-D11 of the DAC (not used for D12-D15); CLK_SEL selects the clock input mode of the counter; CLK_AVR is connected to an I/O terminal of the MCU, and the pulse signal is output on CLK_AVR as the clock of the counter through software programming; CLK_CPLD is connected to the 150MHz clock Signal; /WR and /WE are connected to the I/O terminal of the MCU.
When the PC downloads data, the control flow is as follows:
①CLK_SEL=0, select the software clock
②Reset the address counter
③MCU sends data to PA[15:0]
④/WR changes from 0 to 1, opens the data buffer from MCU to SRAM The device writes data
to SRAM ⑤ Give CLK_AVR a pulse to increase the counter by 1 to point to the next receiving address unit of SRAM.
When the data download is completed, CPLD is started to fetch data from SRAM to DAC. The control process is as follows:
①WE=1, open the buffer from SRAM to DAC.
②CLK_SEL=1, the input clock of the counter selects the 150MHz external clock,
③Reset the address counter, the address counter starts counting driven by the external high-speed clock, and the data is taken out from the SRAM and sent to the DAC for data conversion.
CPLD programming is carried out in the QuartusII5.0 environment. Quartus design input supports program input and graphical input of hardware description languages such as AHDL, VHDL, Verilog HDL, and graphical input is used here. After completing the design input, compile, functional simulation, and timing simulation are performed in sequence. Figure 3 below is the timing simulation result of CPLD taking data to DAC for conversion. The operating frequency of the CPLD in the figure is 125MHz, and in actual operation, the highest operating frequency is 200MHz. As can be seen from the figure, every time a clock comes, the CPLD takes out a piece of data from the SRAM and sends it to the DAC for A/D conversion. Finally, the results are downloaded to the CPLD for internal operation.
Software design
AWG software is written using CodeVision AVR C [3]. AT90S8515 supports ISP (In System Programming). After the program is compiled, it is downloaded to AT90S8515 through the JTAG port. In order to cooperate with the use of this device, we designed the host computer software in the VB development environment. Its running interface is shown in Figure 4. Select the waveform to be generated in the software and then download it to the AWG.
The AWG and the PC use RS-232 serial communication. After powering on and running, wait for the PC to transmit the waveform. After receiving the waveform data, start the CPLD to take out the data from the SRAM and send it to the DAC for D/A conversion, and then form an output waveform through a low-pass filter.
?
Figure 4.
Conclusion of
waveform data generation software . After the AWG and PC are connected through the RS232 serial port, run the PC software, select the waveform to be generated on the PC, and download the generated waveform data to the AWG. You can choose absolute phase shift keying with linear modulation technology. (BPSK), relative phase shift keying (DPSK), quadrature phase shift keying (QPSK), interleaved quadrature phase shift keying (OQPSK), π/4 offset differential phase shift keying (π/4-DQPSK) ), binary frequency shift keying (FSK) of constant envelope modulation, minimum frequency shift keying (MSK), Gaussian filtered minimum frequency shift keying (GMSK), M-phase phase shift keying of hybrid linear and constant envelope modulation techniques Control (MPSK), multi-ary quadrature amplitude modulation (QAM), multi-ary frequency shift keying (MFSK) and other waveforms, download them to the AWG to generate the desired waveforms. Figure 5 below is the 2FSK (Frequency Shift Key) waveform synthesized by the DAC operating at 125MHz.
Figure 5 2FSK waveform
References:
[1] Huang Zhengjin, Xu Jian, et al., Introduction and Application of CPLD System Design Technology, 2002, Beijing
[2] Atmel Corp., AT90S8515 datasheet, 2002
[3] Atmel Corp., CodeVision AVR C Compiler Reference ,?2002
[4]Altera Corp.,MAX7000 Programmable Logic Device Family Data sheet,November,2001
Previous article:Hardware design of digital signal processor based on PCI bus
Next article:Hardware design of digital signal processor based on PCI bus
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- ssh network login
- What can damage the dp83848 chip? The reset pin is always low and the chip cannot start.
- The 200-meter line signal has irregular jumps after the op amp output
- 【GD32F307E-START】+ Completed driving LCD19264 display
- ESP32 port adds support for ESP32-S3
- TMS320C6000 Pipeline Overview
- Will the GaN RF market become more and more popular?
- The embedded operating system I know - to use it or not, that is indeed a question
- What are the models of mobile phone charger power chips and what are the replaceable chips?
- Mbed OS 2020 release schedule