RISCV based simple oscilloscope experiment
RISCV-based simple oscilloscope experiments
Project name：Hummingbird-based simple oscilloscope experiment
Specific requirements：Capture waveform signal through xadc module, display waveform image on TFT screen, and calculate waveform maximum, minimum, peak-to-peak value, frequency, etc.
The waveform supports square wave, sine wave, triangle wave, with amplitude range 0~3.3V, frequency 10hz~100hz, signal sampling rate 1ksps, support dual channel acquisition \ display.
TFT screen introduction:
This experiment uses a 3.5-inch spi interface TFT-LCD, model ZJY350IT006. ZJY350IT006 is a color active-matrix liquid crystal module containing amorphous silicon TFT (thin film transistor). It consists of color TFT-LCD panel, driver IC, FPC and backlight unit. The display area of this module contains 320x480 pixels, and this product complies with RoHS environmental standards, and the driver chip is ILI9486.
Step 1：Installation with Perf-V IDE
Step 2: Create a new project
Run the IDE
Select the workspace and click Launch to open the IDE interface.
Click New Perf-V Project on the leftmost side of the upper toolbar.
Select Perf-V C Project, fill in the project name, then click Next until Finish
You have successfully created a new project.
Step 3: Write the code
You can create a new C file in the project and write the code directly, or copy the C file from the sample into the project.
Step 4: Compile and Run
Click the Build icon on the toolbar to start compiling
The compilation is complete.
Right-click the launch file in the project and select Run as or Debug as .
the program starts running.
Step 5: Power on the development board, connect the JTAG downloader and computer, JTAG downloader and development board, plug the screen into the development board, compile and download the program according to the above method, as follows.
TFT screen can then display the simple oscilloscope standard page program normally, as follows.
Simple oscilloscope standard page.
1） the upper part of the waveform data display area, divided into channels ad1, ad2
2） the middle for the waveform display area, the left side of the scale
3） The bottom is the function button display, k3: pause \ sampling, k2: waveform acquisition trigger value (default rising edge, 1.6V)
Step 6: Start the waveform generator, connect the probe to the output of the waveform generator, and the corresponding waveform will be displayed on the screen.
Step 7: Adjust the pause sampling function by key3, and adjust the waveform frequency detection trigger point by key2, which can detect the waveform frequency by rising edge (default trigger value is 1.6V), and support 5 gears adjustable.