There are so many different CPUs today and often the hardest thing about using any of them is getting started and gathering the right software tools. If you’ve ever eyed up the very inexpensive STM8 processor, you’ll want to check out [Shane Burrell’s] video (see below) about how to get started with the STM8.
The STM8 isn’t a 32-bit processor — you could probably guess that from the name. [Shane] uses SDCC (small device C compiler) to target the little chip. He also shows how he manages a fairly substantial piece of code and how he controls the build process.
The good thing is, this isn’t a blinking LED example. The code he shows uses interrupts and reads analog values. He doesn’t get into a lot of details, but he does talk about the motivation for some of the code. You’ll also pick up some tips like storing firmware with hardware designs in Git.
We think the example has something to do with the vehicle you can see in the video. We’ve seen the STM8 doing duty inside a soldering iron recently. If you want to pick a processor beyond the obvious, check out [Jay Carlson’s] comparison of 21 microcontrollers that cost under a buck.
You might also check out more STM8 related goodness (with a ‘duino flavour) here -> http://www.stm32duino.com/viewforum.php?f=52
.. and if that lot is tl;dr, this particular post might whet your appetite … http://www.stm32duino.com/viewtopic.php?f=52&t=2682&start=20#p39498
… in particular the remark …
“For example the W1209 thermostat as a “development board” is under $2.00 complete with 3 digit display, 3 user defined buttons, a relay, a NTC sensor, and STLink programming pins brought out on the PCB (through holes to the left of the display in this case). “
$1.27 here:
https://www.aliexpress.com/item/sku/1852521499.html
Beware! Now they come with nuvoton N76E003AT20 (8051 core) chips. The sucker is pin compatible except for pin 8, VCAP, so C5 is open on the otherwise identical board…
I like the STM8 chips because they have high temp variants that are cheap. :)
Don’t forget STMef, forth for not just the chip but lots of cheap boards like the W1209.
https://hackaday.io/projects?tag=STMef for inspiration
https://hackaday.io/projects?tag=STMef
No projects found.
:-(
Try this: https://hackaday.io/project/16097-eforth-for-cheap-stm8s-gadgets
STM8 dev boards are almost impossibly cheap on Aliexpress, even cheaper than the STM32 “Blue Pill”. $0.74 with shipping:
> https://www.aliexpress.com/item/ARM-STM8S103F3P6-STM8-Minimum-System-Development-Board-Module-For-Arduino/32313575368.html
You need an ST-Link to program it, but that’s only another $2 and they can be used to program/debug other STM micros.
> https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180212201608&SearchText=st-link
Yes these boards and the programmers actually work. As long as you know what you are getting into they are great. They are fairly easy to use, but not quite as friendly and idiot proof as an Arduino, so maybe not for beginners.
I am currently in the process of writing a new firmware for my PC Speaker. I opened it to check the mains PSU inside only to find a debug interface behind a easy to access cover in front and a STM8 controlling everything.
If you want to use ST’s StdPeriph library with SDCC on that chips, you should know that compiler is unable to reduce an unneeded code – all written functions (not ever used) will be in your binary file. The workaround is to split all your libs on separate files (single function at each file).
So if you do not want to deal with registers and want to use StdPeriph, check this: https://github.com/grytole/stm8builder
We are using STM8 for BLDC “very low resolution FOC” on EBike motor controllers (we started 10 months ago). We are developing on Linux and Windows, using SDCC and OpenOCD to flash and debug on Eclipse — please give a look on our project page “Flexible OpenSource EBike motor controller firmware”: https://opensourceebikefirmware.bitbucket.io/
Wuss. What’s the point of using an 8-bitter if you’re not going to program in assembler…?
I bet you write this after knowing the ESP-14, don’t you?
No, no post about ESP-14, that’s a horrible module.
Hi Al,
nice to see your code on video ….
Thanks a lot
I have a full series on this as well including more on the STM8. https://www.youtube.com/playlist?list=PLzUuu4dRrPGSo7aRlp4fvzUmKuvhmfR3X
my first tiny tuto about stm8
https://github.com/hbendalibraham/stm8_started/wiki