Skip to content

Commit 3813144

Browse files
committed
add details for the pin descriptions
1 parent 2b8410e commit 3813144

4 files changed

Lines changed: 22 additions & 9 deletions

File tree

docs/hardware/esp14.png

25 Bytes
Loading

docs/hardware/esp14.svg

Lines changed: 9 additions & 6 deletions
Loading

docs/hardware/stm8blue.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,26 @@ this mapping:
6666

6767
![STM8S103 breakout board pin mapping](stm8blue.png)
6868

69+
The pins D3/D4 (SDA/SCL, PB5/PB4) are different from the others as they are
70+
true open drain pins. That means, they only can drive the output low or
71+
open. To drive it high, they require the of an external pull-up resistor.
72+
This is the reason why the LED on this breakout is connected between +3.3V
73+
and the pins and not between the pin GND as usual. This way it is possible
74+
to drive the LED by writing a zero to the output register.
75+
76+
77+
6978
sduino pin | STM8S103 CPU port pin
7079
---------- | ---------------------
71-
0-2 | PA1-PA3
80+
0-2 | PA1-PA3 (PA1 and PA2 only weak output drivers)
7281
3-4 | PB5-PB4 (reverse order)
7382
5-9 | PC3-PC7
7483
10-15 | PD1-PD6
7584

7685
serial: 14,15
7786
SPI: 2,7,8,9
78-
I2C: 3,4
87+
I2C: 3,4 (true open drain. can't drive a high signal without an external
88+
pull-up resistor)
7989
Analog: 6,11,12,14,15
8090
PWM: 2,5,6,12 plus either only 13 or 7-9 but not 13 (via alternate mapping)
8191

examples/sdcc-examples-stm8/blinky.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "stm8l.h"
1+
#include "stm8s.h"
22

33
int main() {
44
int d;

0 commit comments

Comments
 (0)