STM8 Tutorial

If you like it, share it

  • Step By Step that explain how to start to develop a new program on STM8S is here.
  • Tutorial that explains how to start developing on STM8S with two examples for SILICA STM8S EvaBoard already developed plus schematics etc, click here
  • How to install the new driver for ST-Link-v2 and STM8 software for test the configuration is here.
  • Tutorial that explain how to use TIM4 on STM8S Discovery and excel sheet to calculate parameters for TIM4, is here.
  • Tutorial that explain how to use TIM4 and TIM1 under interrupts, is here.
  • Tutorial that explain how to implement an Input reading with debounce and test it on STM8S Discovery, is here.
  • STM8S208 EEPROM @near unsigned char EVal4000  @0x4000, Inter.Mode, Test-R/W, IntOsc16MHz, LCD, SystemTick blinking Led4-4ms (STM8S-ex1) is here.
    This SW works on STM8/128-EVAL and uses:

    • Internal 16MHz rc
    • EEPROM test at address 0x40A5 using declaration @near unsigned char EVal4000  @0x4000;
    • Read Byte
    • Complement Byte
    • Write Complement Byte
    • Test if Write is OK
    • LCD show the EEPROM test
    • SysTick TIM4 approximately 4mS on LED4
  • STM8S208 EEPROM InterMode, Test-R/W, IntOsc16MHz, LCD, SystemTick blinking Led4-4ms (STM8S-ex2) is here
    This SW works on STM8/128-EVAL and uses:

    • Internal 16MHz rc
    • EEPROM test at address 0x40A5
    • Read Byte
    • Complement Byte
    • Write Complement Byte
    • Test if Write is OK
    • LCD show the EEPROM test
    • SysTick TIM4 approximately 4mS on LED4
  • STM8S208 ADCinterupt, BoubleShort, IntOsc16Mhz, LCD, SysTick blinking Led4 1s (STM8S-ex3) is here
    This SW works on STM8/128-EVAL and uses:

    • Internal 16MHz rc
    • ADC read PE6 – AIN9 connected to Potentiometer
    • Include a Bubble Short using for stabilize the ADC result
    • LCD show the ADC value of the Potentiometer
    • SysTick TIM4 1mS
    • KEY button (uder Interupt) to On/Off LCD light
    • Auto OFF LCD light
  • STM8 LCD driver 4×20 ( HD44780 interface ) – By Giorgio R. (STM8S-ex4) is here
    Thanks to our friend Giorgio who sharing his library for driving LCD 4×20 using STM8.
    This SW is easy to traslate on another MCU.
    Features:

    • Tested everything with STM8S208 to 16MHz
    • DELAY are obviously related to the frequency of micro (16Mhz)
    • Hitachi HD44780 interface
    • 8 characters “built” in CGRAM
  • Touch Sensing Library in STM8 – A tutorial that explain how to use the firmware supplied by the STM can … build a touch key
  • How to change Touch Button Sensitivity on STM8S Discovery – click here
    Click Here to get: Touch Sensing Library

Complete list of the STM8 software examples are here

  • STSW-STM8008 – MCUs Embedded Software    Developing and debugging your STM8L-DISCOVERY application code (UM0991)
  • STSW-STM8009 – MCUs Embedded Software    Introduction to STM8L15x power saving modes using the STM8L-DISCOVERY IDD measurement feature (AN3269)
  • STSW-STM8010 – MCUs Embedded Software    Building a wave generator using STM8L-DISCOVERY (AN3252)
  • STSW-STM8070 – MCUs Embedded Software    STM8L-DISCOVERY – temperature sensor example
  • STSW-STM8069 – STM8S/A Standard peripheral library