Design of Signal Generator Based on FPGA and 51 SCM

Design of Signal Generator Based on FPGA and 51 SCM

A signal generator, also known as a waveform generator, is a commonly used signal source and one of the important instruments widely used in Electronic circuits, communications, control, and teaching experiments. In order to reduce the cost of the traditional function signal generator, improve the low frequency stability of the signal generator. The author combines FPGA and 51 microcontroller to generate 0.596 Hz frequency precision function signal. The author designed the function signal type and related parameters to be controlled by the 51 single-chip microcomputer, and the user can set the required waveform, waveform amplitude, waveform frequency and the duty cycle and phase of the square wave through the buttons.The design scheme of this paper not only has good economic prospects, but also can provide profound insights into contemporary higher education.

A signal generator, also known as a waveform generator, is a commonly used signal source and one of the important instruments widely used in electronic circuits, communications, control, and teaching experiments. In order to reduce the cost of the traditional function signal generator, improve the low frequency stability of the signal generator. The author combines FPGA and 51 microcontroller to generate 0.596 Hz frequency precision function signal. The author designed the function signal type and related parameters to be controlled by the 51 single-chip microcomputer, and the user can set the required waveform, waveform amplitude, waveform frequency and the duty cycle and phase of the square wave through the buttons. The design scheme of this paper not only has good economic prospects, but also can be a reference direction for the deepening reform of contemporary higher education.

1 System design scheme

1.1 System Hardware Design

The hardware in the design in this article includes EP2C8Q20818N chip, C8051F0201 microcontroller, DAC0800 chip, and T6963 LCD. This paper mainly uses FPGA (EP2C8Q20818N) to bridge control LCD, 4×4 keyboard and DAC0800 (C8051 microcontroller and DAC0800 have a reference voltage signal). The system hardware design block diagram is shown in Figure 2. In this paper, function signals are mainly generated by FPGA (EP2C8Q20818N); C8051 microcontroller is used to analyze and process user information, provide reference voltage to DAC0800 and control FPGA (EP2C8Q20818N) to generate function signals that require users.

1.1.1 Introduction to EP2C8Q20818N

EP2C8Q20818N is an embedded FPGA (Field Programmable Gate Array) chip introduced by ALTERA. Has 182 pins. Its characteristic table is listed below, as shown in Figure 1.

Design of Signal Generator Based on FPGA and 51 SCM

1.1.2 Introduction to C8051F0201

The C8051F0201 (hereinafter referred to as 51 MCU) device is a fully integrated mixed-signal system-level MCU chip with 32 digital I/O pins. This 51 microcontroller features a high-speed, pipelined 8051-compatible CIP-51 core (up to 25 MIPS). Full-speed, non-intrusive in-system debug interface (on-chip). 12-bit, 100 ksps, 8-channel ADC with PGA and analog multiplexer. 8-bit 500 ksps ADC with PGA and 8-channel analog multiplexer Two 12-bit DACs with programmable data update methods. 64 Kbytes of in-system programmable FLASH memory. 4 352 (4 096+256) bytes of on-chip RAM, an external data memory interface that can address a 64 k-byte address space. Hardware-implemented SPI, Sm Bus/I2C and two UART serial interfaces, five general-purpose 16-bit timers. Programmable counter/timer array with 5 capture/compare modules. On-chip watchdog timer, VDD monitor and temperature sensor are included, and each MCU can work with 2.7 to 3.6 V in the industrial temperature range (-45 to +85°C). The port I/O, /RST, and JTAG pins are all tolerant of 5 V input signal voltages.

Design of Signal Generator Based on FPGA and 51 SCM

1.2 C8051 MCU software design

C8051 microcontroller software mainly includes key processing function, signal generator control function, initialization function, LCD Display function, D/A function and main function. The main program flow chart of the software design is shown in Figure 3, and the detailed functions of the sub-functions are shown in Table 1.

Design of Signal Generator Based on FPGA and 51 SCM

Design of Signal Generator Based on FPGA and 51 SCM

1.3 FPGA (EP2C8Q20818N) software design

This paper mainly uses Verilog HDL language design. It mainly includes chip selection module, clock drive module, keyboard scanning module, outgoing signal module, LCD module, DAC0800 module and indicator light module. The detailed functions are shown in Table 2.

Design of Signal Generator Based on FPGA and 51 SCM

1.4 FPGA core program code, DAC0800 module program

Design of Signal Generator Based on FPGA and 51 SCM
Design of Signal Generator Based on FPGA and 51 SCM
Design of Signal Generator Based on FPGA and 51 SCM

2 Test results

Design of Signal Generator Based on FPGA and 51 SCM

Design of Signal Generator Based on FPGA and 51 SCM

3 Conclusion

In this paper, FPGA and 51 microcontroller are used to combine to make a signal generator. In this way, students can not only exercise the use of single-chip microcomputer and FPGA, but also allow students to learn how to use FPGA and single-chip microcomputer for joint communication. In the design of this paper, the function signal accuracy can be upgraded to meet the function signal requirements in different occasions. This paper advocates a learning method that combines MCU and FPGA, which can provide a reference direction for modern education reform.

The Links:   G150XG03-V3 2FI100A-060C

What Is The Difference Between Carbon Fiber And Carbon Fiber Composites How To Judge The Pros And Cons Of Carbon Fiber Board