STM8 SDK
Toolchains and Program
Functions
IO Registers
- Data Direction Register – DDR, DDR to 1 for output pin, or 0 for input pin
- Control Register 1 – C1
- Control Register 2 – C2
- Output Data Register – ODR - Reset the pin by setting ODR to 0
- Input Data Register – IDR
Register | Mode | Value | Description |
---|---|---|---|
CR1 | Input | 0 | Floating input |
CR1 | Input | 1 | Input with pull-up |
CR1 | output | 0 | Open drain |
CR1 | output | 1 | Push-Pull |
CR2 | Input | 0 | Interrupt disabled |
CR2 | Input | 1 | Interrupt enabled |
CR2 | output | 0 | Output up to 2 MHz. |
CR2 | output | 1 | Output up to 10 MHz |
Documents
Code Resources, Headers, etc
- STM8 Opensource Headers - https://github.com/gicking/STM8_headers
- SDCC supported, arduino based firmware - Sduino.
- STM8MXcube - http://pan.baidu.com/s/1bpFyXxt pass: 3pgm
Tutorial, Resources
- STM8S103 Datasheet link from ST website, if not work please try search it
- STM8 Family
- STM8 and STM32 product and tool selection guide
- STM8S003F3 (P6) - Direct IC datasheet from St.com here.
- Demo code back up page.