
1 Application description
This section describes the hardward requirements, the application's schematics and the application's principle to
use the GPIOs and the interrupt controller to drive a set of LEDs on the NUCLEO-8S208RB or the
NUCLEO-8L152R8 boards.
1.1 Hardware requirements
No on-board resources are required other than the user push-button.
The external components required by the application are listed on the table below.
Table 2. External hardware components required
External components Value Comments
LD2, LD3, LD4, LD5 - Standards LEDs
R2, R3, R4, R5 510 Ω Protective resistors
1.2 Application schematics
The figure below shows how to interface the LEDs and the push button with the NUCLEO-8S208RB or the
NUCLEO-8L152R8 boards. For details on NUCLEO-8S208RB or NUCLEO-8L152R8 boards implementation,
refer to the board schematics provided in the corresponding user manual (UM2351 or UM2364).
Protective resistors, R2, R3, R4, and R5, are mandatory to limit the current to a value that does not harm the
LEDs. The push button requires a debounce filter (RC) and a pull-up resistor (R1) to avoid triggering several
interrupts due to the mechanical bouncing of the button.
Figure 1. STM8S Series application schematic
R5 R4 R3 R2
LD5 LD4 LD3 LD2
PB2
R1
V
DD
STM8S208RBT6
PB3 PB4 PB5
PE4
C
R
User’s push button
AN5178
Application description
AN5178 - Rev 1
page 2/11