-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Board support for STM8S105K4T6 Development Board #17
Comments
Good find, thank you for pointing out this board! I immediately ordered a few to play with but it will take a month for them to arrive here. After working on this project for a while I more and more feel that the hole idea of Arduino-like pin numbers is more in the way than actually helping the beginner. It just adds another level of indirection and table lookup to programming and wiring. In most cases I find it more convenient to use the pin names like I am thinking of totally giving up on this half-Arduino-like scheme and either go for a very strict breakout board-specific geometical scheme or, even futher, go for a simple algebraic scheme as it is done for the ATxmega series: PA0..7 is pin 0..7, PB0..7 is pin 8..15 and so on, no matter if this pin even exists for the used CPU. To allow for easier porting between different breakout boards and CPUs it might be helpful to define functional pin names on top of this (PA0, PA1, TX, MOSI, A0 etc) and nobody has to care about numbering schemes anymore. The major downside I see on this approach is breaking libraries that make hard coded assumptions about pin numbers. Especially the pin number 0 for the serial pin is often treated special or used as a marker for an unused function/pin. Lines like So, the conclusion is: I don't see the one right way to number the pins. In general I am more satisfied with the more regular numbering scheme for the Discovery board than the scattered scheme for |
I believe that the PxN approach is the best since many board exists. On STM32duino there is the same approach for the same reason (exception of MapleMini boards since it has a differen numeration on the board). Also Energia and ESP8266 (exception is Wemos boards) uses the same approach. |
in issue #19 roybaer pointed me to his design of an STM8S105K6-based board with Arduino-UNO r3 compatible connectors. I just added support for his suggested pinout to the new experimental branch of my code as board It uses a strict functional pin mapping which makes a lot of sense with roybaer's PCB layout. Additionally, generic pin names PxN are supported, which would make sense for the china board. Maybe this is a useful approach to avoid too many different board definitions? The alternative would be a new board definition for generic S105K CPUs using a strictly generic pin numbering scheme PA0..7 -> 0..7, PB0..7 -> 8..15 etc. But I am afraid of getting too many very similar board definitions which would only confuse people. |
Thank you @tenbaht, I will test it later this week on my stm8black board (time permitting) :) |
Just to throw my name in the hat, I plan to use this board (OP's board) as well. PxN names are preferable to me, but any method is ok as long as it is well documented and easy to find. |
At issue #22 dubelectro posted a pin definition for this board and today I tried to integrate that definition for stm8sblack. He chose a strict geometrical pin mapping that is very intuitive for working on a bread board. But the way it's done means that there is an overlap between the digital pin numbers and the analog channel numbers which might break some sketches. To avoid that, I suggest to turn the numbering order around and do it the same way it would be done on a DIP package. Using the USB connector as a pin 1 marker and defining that as the top side, we could start at the top left with GND, 5V, and PC3 down to PD7, go to the other side RST, PA1 up to 3V3 and GND. This way the analog pins get high numbers. |
@tenbaht I think that is a good idea |
I agree with your opinion. I was wondering what to do with the direction, but based on the diagram provided by the board developer. There is no special intention. I think that there are probably other problems as well, so I want them to be improved. |
Hi, Any update on that board? I was thinking of getting a couple to work with and test. Should I do that? thank you |
I finally pushed the commits to integrate support for this board. Most of that work was sitting on my hard drive for a long time already, but now I found the time to finish it up. |
Hi, I have got two that I can NOT make them work at all - I opened an issue (No. #74) |
I was wondering how difficult it would be to add support for the STM8S105K4T6 Development Board?
Schematic:
Actual board:
In boards.txt I propose the following:
I'm struggling with an appropriate pins_arduino.h file. I drew up the following pinouts:
stm8sblack pins.xlsx
Any advice on how to proceed?
The text was updated successfully, but these errors were encountered: