This project basically uses an ADC to poll a rotary switch on the kit and update a progress bar on the TFT display based on the position of switch.
This project demonstrates how we can get guaranteed timing using RToS. It is easier to schedule delays between function in and RToS set up rather than using a bare metal code.
FreeRToS is used to manage the tasks. There are two tasks in the project. First one is ADC task and the other one is the task updating TFT. ADC task is the higher priority one. This helps to get better response rate whenever user changes the button. On the other hand, TFT display update task need to be called only when there is a change in the display. This helps to avoid flicker in the display on every update the screen is written from one corner to the other. To achieve this, the ADC task yield to the TFT task only when there is a change in ADC value.
This project has been tested on FM4 Kit with TFT Display.
Comments