The NUCLEO-8S208RB (based on STM8S208RBT6) and NUCLEO-8L152R8 (based on STM8L152R8T6) development boards can be used to evaluate the main features of all STM8S series and STM8L series microcontrollers.
This application note briefly describes how to drive a set of LED indicators using the GPIO and interrupt controller on the NUCLEO-8S208RB and NUCLEO-8L152R8 development boards.
When the microcontroller (STM8S208RBT6 or STM8L152R8T6 in this case) is powered using the USB cable connected to the host computer, the LD2 and LD5 indicators (not the onboard LEDs) start blinking. Each time the "push" button is pressed, the interrupt controller generates an interrupt for controlling the I/O, which then changes the LED display.
1. Application Description
This section describes the hardware requirements, application schematics and operating principle of driving a set of LED indicators using the GPIO and interrupt controller on the NUCLEO-8S208RB or NUCLEO-8L152R8 development board.
1.1 Hardware Requirements
Apart from the user buttons, no other on-board components are required.
The external components required by the application are listed in the following table.
Table 2. Required external hardware components
External Component
Value
Description
LD2, LD3, LD4, LD5
Standard LED
R2, R3, R4, R5
510Ω
Protection Resistor
1.2 Application Schematic
The following figure shows how to connect the LED light and button using the NUCLEO-8S208RB or NUCLEO-8S208RB development board. For a detailed description of the NUCLEO-8S208RB or NUCLEO-8L152R8 development board, please refer to the board schematics provided in the corresponding user manual (UM2351 or UM2364).
Protection resistors R2, R3, R4, and R5 must be used to limit the current to a value that does not damage the LED indicator. The push button requires a debounce filter (RC) and a pull-up resistor (R1) to avoid triggering an interrupt due to mechanical bounce of the button.
Previous article:Using the STM8 Nucleo-64 development board to communicate with the terminal via RS232
Next article:Displaying variable voltage on an LED strip using the STM8 Nucleo-64 development board
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- [RVB2601 Creative Application Development] Temperature and Humidity Monitoring System Based on Alibaba Cloud
- MPLAB X IDE compile error!!! Newbie asks for help from experts/(ㄒoㄒ)/~~
- Future Prospects of UWB Technology
- On the problem of value jump in PMT application
- Use of access/_access function in C language
- [Rvb2601 Creative Application Development] +02 Flowing Light
- Millimeter wave technology: key 5G technology
- "Date in Spring" + Factory Tour
- IPTV boom is coming, policy environment and operation model are clear?
- Application skills/Atmel microcontroller application skills