STM8S Example Projects With SDCC
This repository is a collection of simple projects for STM8S003F3 to help you get started with this series of small, cheap but capable MCU's.
The examples in this repository are tested with a generic STM8S003F3P6 in TSSOP20 package. There is no reason they do not work on other packages.
For compatibility with other STM8X (e.g. L) series of MCU's make sure the registers in the "include/stm8s.h" are compatible with your own MCU. Just make a copy of this file and apply changes according to the datasheet of the chip you have at hand.
For tutorial on programming these examples on your MCU, please check the guide to flashing stm8 on linux.
- examples Contains examples
File Name | Description |
---|---|
blink | Blinks an LED |
inputpooling | Reads a pin configured as input and reacts by turning a LED on/off |
leddance | Uses the implemented dance routins to make appealing LED dancing |
uart | A simple UART communication example that prints characters to serial |
- include Header files which contain constants, types and function declarations
- include Used for store git repository, not important for users
- src Contains function definitions
Just go inside the 'examples' folder and see the source code for each example. Use the Make file to compile and flash the example on your own chip.
This is an ongoing project. I will try to add more examples, e.g. Timers, interruprs, SPI and I2C.
If you have nice examples and projects, please contribute to this repository.
Your donations will make further development much faster! If you are interested to donate to EMBEDONIX (any amount even 1$ is welcome!) please visit EMBEDONIX.COM and click on the paypal donate button!