STMicroelectronics AN3266 Application Note

AN3266 is an application note published by ST. It describes how to use the STM8S-DISCOVERY's GPIOs and interrupt controller to drive LEDs. The note contains hardware connection, schematics, software configuration, program code, etc.


STMicroelectronics AN3266 Application Note - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
11
File format
PDF
File size
109 KB
Published
06 August, 2012
Updated
30 September, 2023
MD5 checksum
FDFC49C1279E1C580DA8C423C6206149

About this manual

This document describes an application based on the STM8S-DISCOVERY evaluation board. It demonstrates how to configure the STM8S105C6T6 microcontroller's GPIOs and interrupt controller to control a set of LEDs (LD2, LD3, LD4, and LD5) using a pushbutton.

What's inside

  • Application description
  • Hardware requirements
  • Application schematics
  • Application principle
  • Software description
  • STM8S peripheral configuration
  • Standard firmware library configuration
  • Application software flowchart
  • Revision history
  • Legal disclaimers

Specifications

MicrocontrollerSTM8S105C6T6
BoardSTM8S-DISCOVERY
External componentsLD2, LD3, LD4, LD5 LEDs
Resistor value510 Ohms
Pull-up resistor4.7k Ohms
Debounce filter capacitor100 nF

Frequently asked questions

What happens when the STM8S-DISCOVERY is powered up?

LEDS LD2 and LD5 start blinking, indicating that the programming operation has completed successfully.

How does the pushbutton control the LEDs?

Pressing the pushbutton generates an interrupt that triggers the blinking of the other pair of LEDs while switching off the first one.

What is the purpose of the pull-up resistor and debounce filter?

They are required for the pushbutton to avoid triggering several interrupts due to mechanical bouncing.

Download PDF (109 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →