https://tenbaht.github.io/sduino

https://github.com/tenbaht/sduino           

Sduino-Stm8s103f3 datasheet                      

The STM8S103 breakout boards are build around a CPU STM8S103F3P6 with 16MHz internal oscillator, 8kB flash, 1kB RAM, and 640 byte EEPROM.

The CPU includes a UART, SPI, I2C, PWM, 10 bit ADC, 3 timer, and up to 14 I/O pins - quite similar to an Atmel ATmega8.

One (red) LED is connected to GPIO PB5 (CPU pin 11). The push button is for reset. The CPU runs on 3.3V, a linear regulator is integrated on the board.

The micro USB connector is only for (5V) power supply, the data lines are not connected.

All CPU pins are easily accessible on (optional) pin headers (pitch 2.54mm, perfect for breadboards).

Schematic of the STMS103 board

My breakout boards came preprogrammed with a blink program and with active write protection bits. For unlocking before first use:

stm8flash -cstlinkv2 -pstm8s103?
3 -u

Connection to the flash tool

I am using the ST-Link V2 compatible flash tool in the green plastic housing. The one in the metal housing uses a different pinout.

Connection to the flashtool:

Signal nameP3 on CPU boardGreen flash toolMetal flash tool
3V3127
SWIM255
GND373
NRST491

Pin number mappings

The Arduino environment uses its own pin numbering scheme independent from the physical CPU pin numbers. Many Arduino sketches and libraries contain hard-coded assumptions about the number of pins with special functions. Ideally, all these numbers would be the same and all programs could be compiled without changes.

Here I discuss some possible pin mapping schemes and check how close we could get the the ideal mapping. Unfortunatly, it turns out that a perfect mapping is not possible.

In the end I chose a simple geometric numbering for the square UFQFPN20 package starting with port pin PA1 and counting up from 0. This results in this mapping:

STM8S103 breakout board pin mapping

The pins D3/D4 (SDA/SCL, PB5/PB4) are different from the others as they are true open drain pins. That means, they only can drive the output low or open. To drive it high, they require the of an external pull-up resistor. This is the reason why the LED on this breakout is connected between +3.3V and the pins and not between the pin GND as usual. This way it is possible to drive the LED by writing a zero to the output register.

sduino pinSTM8S103 CPU port pin
0-2PA1-PA3 (PA1 and PA2 only weak output drivers)
3-4PB5-PB4 (reverse order)
5-9PC3-PC7
10-15PD1-PD6

نظر بدهید

توجه: HTML ترجمه نمی شود!
    بد           خوب
کد امنیتی

برد sduino با قابلیت پشتیبانی از آردوینو

68412

  • کد محصول: SDUINO-STM8S103F3P6
  • موجودی: 2
  • 161,000تومان


برچسب ها: برد sduino با قابلیت پشتیبانی از آردوینو

سوالی دارید بفرمایید؟
Pedram Sinayee Avatar


سلام
می تونم کمکی کنم؟


Via Web Via Phone