STM8 SDK

From ElectroDragon Wiki
Revision as of 12:06, 6 July 2020 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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


Tutorial, Resources