### 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.
![](././../../images_dir/1628072408/111.png) **
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.
![](././../../images_dir/1628072515/112.png) **
Experimental process:
**
Step 1:Installation with Perf-V IDE Step 2: Create a new project Run the IDE
![](././../../images_dir/1628072598/113.png)
Select the workspace and click Launch to open the IDE interface.
![](././../../images_dir/1628072646/114.png)
Click New Perf-V Project on the leftmost side of the upper toolbar.
![](././../../images_dir/1628072693/115.png) ![](././../../images_dir/1628072718/116.png)
Select Perf-V C Project, fill in the project name, then click Next until Finish
![](././../../images_dir/1628072762/117.png)
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.
![](././../../images_dir/1628072820/118.png)
Step 4: Compile and Run
![](././../../images_dir/1628072863/119.png)
Click the Build icon on the toolbar to start compiling
![](././../../images_dir/1628072915/120.png)
The compilation is complete.
![](././../../images_dir/1628072959/121.png)
Right-click the launch file in the project and select Run as or Debug as .
![](././../../images_dir/1628073011/122.png)
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.
![](././../../images_dir/1628073070/123.png)
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)
![](././../../images_dir/1628073156/124.png)
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.
![](././../../images_dir/1628073225/125.png)
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.
--- ![](././../../images_dir/1703141148/4.png)