This application note introduces an application example that adjusts the blinking frequency of a string of 4 LEDs using a potentiometer.
This document introduces a simple application example for beginners to learn about the STM8SVLDISCOVERY evaluation board and its programming environment. The application adjusts the blinking frequency of a string of four LEDs by measuring the analog voltage from a potentiometer using the microcontroller's ADC.
| Microcontroller | STM8S003K3T6 |
|---|---|
| ADC Resolution | 10-bit |
| ADC Channel | AIN2 |
| LED Count | 4 LEDs |
| Potentiometer Value | 10 K |
| Resistor Value | 510 ohms |
The application requires an STM8SVLDISCOVERY board, a 10 K potentiometer, 4 LEDs, and 4 resistors of 510 ohms.
The blinking frequency is controlled by a potentiometer which adjusts the analog voltage measured by the ADC, thereby changing the delay time for each LED.
No, the application automatically starts as soon as the STM8SVLDISCOVERY is powered-up through a standard USB cable connected to the host PC.