This tutorial documented the steps of creating an Oscilloscope.
3 Sampling Modes: auto, normal and single time
2 Trigger Modes: rising edge and falling edge
Hardware：stm32f103, 3.2 inch ILI9341 LCD display
RT-Thread Inside Part
Kernel： Scheduler, Semaphore, Message Queue.
Scheduler： Create multiple threads for different purposes.
Semaphore： Used to synchronize threads.
Message Queue： Used to transfer the data between threads.
The signal of the waveform generator acquired by the ADC processed on the stm32f103 chip and being displayed on the 3.2-inch ILI9341 LCD screen.
Software Module Introduction
Wave sampling thread, determine the sampling frequency based on the time represented by each grid of the settings screen, and determine the sampling start point according to the trigger threshold and trigger mode, then sampling the waveform and save it.
Waveform display thread; Waveforms are displayed according to the area of the screen.
Key scan thread; Read the key values for conversion and send them to the setting thread.
Set the action to execute the thread, perform the settings item modification operation, and refresh the display information.
Read the key scan thread and convert the settings information to the settings thread to change the settings and display the refreshed information.
Used to communicate between the waveform sampling thread and the waveform display thread to ensure that the sampling waveform is displayed in a timely manner.
Used to communicate between setting threads and key scan threads to ensure that key signals are read in a timely manner while avoiding excessive resource consumption by key scan threads.
Catch the Code
RT-Thread Contact Info:
Website | Github | Twitter | Facebook | Youtube
Leave your feedback...