Introduction:
In the realm of electronic technology, oscilloscopes play a pivotal role. They enable users to easily and intuitively visualize signals and measure key parameters like amplitude, frequency, and period. Traditional analog oscilloscopes suffer from limitations due to the constant afterglow time of the phosphor material, making them unsuitable for observing signals with longer periods. Additionally, they cannot perform specialized mathematical operations such as Fast Fourier Transform (FFT). Digital oscilloscopes address these issues by leveraging advanced measurement techniques. By employing high-speed Analog-to-Digital (A/D) converters, digital oscilloscopes sample and digitize analog signals. Utilizing the powerful processing capabilities of processors, they apply various digital signal processing algorithms to present waveforms graphically and extract detailed signal parameters.
System Overall Scheme:
The block diagram of this design is depicted in Figure 1. The flexibility of the Field-Programmable Gate Array (FPGA) allows most system functionalities to be implemented internally, resulting in a streamlined architecture. Peripheral circuits include an A/D conversion module, an LCD display, an SD card, a FLASH memory, and buttons.
The purpose of the A/D conversion module is to convert analog signals into digital signals. The FLASH module stores the firmware program of the System-on-a-Programmable-Chip (SoPC) system. The SD card module facilitates long-term and large-scale storage of measurement data while providing an interface for subsequent PC-based analysis. The LCD module ensures real-time display of measured signal waveforms and associated parameters. The button module serves as the interface for adjusting and controlling the entire system.
2 FPGA Logic Function Module Design:
The internal system diagram of the FPGA is illustrated in Figure 2. It primarily consists of a sampling rate controller, a trigger control unit, a FIFO controller, a frequency measurement unit, a button control unit, and an LCD driver.
3 SoPC Design:
This design utilizes the Nios II/f processor, operating at 50 MHz with a hardware multiplier. Embedded RAM within the FPGA acts as the system's operational memory. FLASH memory serves as off-chip memory, storing the user program, which connects to the Nios II processor via the Avalon bus tri-state bridge.
3.1 SoPC Software Design System:
After initializing the LCD, SD card, and FAT file system, the software first generates the graphical interface, outputs fixed information, reads waveform parameters, and displays them on the LCD. It then waits for the FIFO to fill. When the FIFO is full, its data is read into a buffer, the waveform is plotted on the screen, and the maximum and minimum values of the waveform are determined. If there is user input, the button event is handled. Otherwise, the software checks for changes in waveform parameters. If there are changes, the display is updated. If no changes occur, the process moves to the next display cycle. The flowchart for this process is shown in Figure 3.
3.1.1 SoPC Underlying Software Design:
The underlying software comprises drivers for each device, primarily including:
(1) LCD Driver:
Based on display requirements, the LCD driver implements the following functions:
- Send data/command: Send data or commands to the LCD.
- Initialize LCD: Perform power-on reset and initialization of the LCD.
- Clear screen: Clear the display.
- Output one pixel: Output a pixel of a specified color at a specific location.
- Draw a straight line: Draw a line from (x0, y0) to (x1, y1) in a specified color.
- Draw a rectangle: Draw a rectangle from (x0, y0) to (x1, y1) in a specified color, with an option to fill it.
- Output a character: Output a character of a specified color at a given position.
- Output a string: Output a string of a specified color at a given position.
(2) SD Card Driver:
The SD card communicates via the SPI mode. The SD card driver performs the following functions:
- Send data/command: Send data or commands to the SD card.
- Read data: Read a byte from the SD card.
- Reset SD card: Reset the SD card after power-on and put it into SPI mode.
Insert Type Rotor,Insert Type Dc Rotor,Insertion Type Variable Frequency Rotor,Variable Frequency Dc Rotor
Suzhou Mountain Industrial Control Equipment Co., Ltd , https://www.szmountain.com