from stm32 to stm8s

Sat May 06, 2017 5:18 pm
these $1 stm8s boards is tickling if i should mess with them :) … 8s&_sop=15

incidentally there’s yet another (historical) thread about moving from stm8s to stm32, i seemed going in an opposite direction :lol:

but given that all it takes is an st-link v2 dongle to program both the stm32f103 blue pill & that stm8s, it seemed like something worth exploring.

i’m thinking about a job that’s probably far too simple for even stm8s, read a 4×4 keypad (eats 8 pins) and send the results over 2 uart pins or i2c pins, of course the other alternative as always is just use resistors & hook those up to an ADC pin :)

Sat May 06, 2017 9:16 pm
I would not mess with stm8, first simply because you need a different compiler, second, the resources are limited.
For small things/tasks, I’m rather using STM32F030, they are TSSOP20 as well, but same compiler as other STM32 can be use.

Sun May 07, 2017 4:17 am
thanks martin, yup, i’d think that makes sense

incidentally the stm32f030 boards cost as much as a blue pill stm32f103, but the board producers throw in a shiny 8 mhz crystal :D … 0&_sacat=0

but even an stm32f030 is significantly more elaborate than do the stm8s
it has 12 bits adc vs 10 bits on stm8s
runs at a much faster 48mhz vs stm8s 16 mhz
has a dma controller vs stm8s none
and significantly more hardware resources compared to stm8s

interestingly an stm8s seemed to be possibly much better than do various other 8 bit mcus e.g. some pic mcus etc

but as for boards between stm32f103 (blue pill) vs stm34f030 boards, for the same price it would be more worth it to get the stm32f103 as system clocks is faster, has more resources and importantly stm32f103 is a native usb device

Wed May 31, 2017 10:05 pm
I’m a big fan of STM8S. Stm8s003 being my goto 8bit chip now. Likely them for the small size, uniformity, easy availability and low low prices.

There resources are on par with your typical pic or avr. But at a fraction of the cost.

A few downside.

1. Compiler choices are limited. Cosmic isn’t that great to use so I’m exclusively on iar.

2. Slow chip. Limited number of registers so …

3. It has that retarded exit design in all stm chips.

Stm32f030f is an interesting chip and like the STM8S has tons of undocumented features.

Thu Jun 01, 2017 12:51 am

There are several other threads about the STM8, as initially we thought perhaps it would be possible to port the existing F103 core to it.

However is a completely different beast.

Re: F030

Looks like there are some F030 boards on eBay e.g. … 2170349977

which are marginally cheaper than the BluePill, but they appear to be the STM32F030F4, which only has 16k Flash and 4k Ram, so would only be usable on projects with very small application code.
Also its only a 48Mhz device, so would be slower than the BP.

So I think you BP is still the best value

Thu Jun 01, 2017 12:41 pm
oh i’ve got my 2 pieces of $1 stm8s boards today :D

yup, they are ‘completely’ different from stm32 has much less ram & flash
only similarity it seemed is that it seemed they can be programmed from the same st-linkv2 dongles
i think stm8s makes fairly decent ‘delegate’ processors, in particular if i run out of pins say on maple mini / blue pill i may resort to ‘delegate’ some io functions to a separate mcu, e.g. a keypad controller, but for keypad i’d guess one way is to chain them up using resistors and use an analog pin to do it, otherwise it may take as many as 8 pins for a 4×4 keypad
i’ve read somewhere that stm8s makes good stepper motor controllers too, just that i’m not too sure if they would ‘conveniently’ replace those pololu steper motor modules
i think for stm8s, it would be necessary to use mosfet transistors or bipolar transistors to drive stepper motors if that’s needed, that would mean additional hardware on boards but possibly more ‘stable’ compared to those ‘integrated’ pololu modules

it is rather ‘extreme’ that today mcu’s like stm8s could actually cost less than 2 pieces of 8 bit shift registers (in particular in small quantities, e.g. for only 2 pieces the bulk of that cost is probably postage ), given that it may be more ‘cost effective’ to just do mcu rather than basic logic blocks like those 74hc* logic modules

Thu Jun 01, 2017 12:55 pm
Not sure how big of a difference 1USD makes but you can get those tssop20 chips, stm32f030f and stm8s003f, for a song. I got mine in llike less than 50 cents shipping included.

I made a series of those ghetto boards with those chips, by simply soldering them onto on adapters.

They ran flawlessly .

Thu Jun 01, 2017 1:03 pm
u see, i’m ‘lazy’ to do my own boards, getting pre-assembled boards with f030 is *expensive* as i’m getting only a few pieces say 2, i would just get those with the cheapest per piece + shipping cost and it so happen stm8s hit the $1 mark on an assembled board :lol:

there are some rather interesting explorations out there on stm8s too like this: … rogramming
while i’d not really think doing forth on stm8s is really practical it shows how far some have tried :lol:

i think for forth @jcw here as well as on his web jeelabs apparently did a good one which runs on stm32

Thu Jun 01, 2017 1:30 pm
just did a little research into stm32f030 … 089834.pdf
it seemed pretty feasible to run stm32f030 with fairly low component count e.g. an ldo, some resistors & caps and run off hsi
i’d probably procrastinate that for another ‘project’ as i’d also need to figure out how to do smd soldering, i’m a little spoilt living off 0.1″ spaced pins, i’ve got an nrf51822 module only to realise how ‘impossible’ is it to solder the castellated 1.2mm pins :lol: … 1978736223
taking a look at one of those common f030 boards on ebay it would seem part of the costs comes from the component counts e.g. an 8mhz crystal, leds, reset button a boot0 jumper and a generally well done board with a proper silk screen. i won’t say that this is ‘expensive’ in that sense as it would possibly take quite a bit of effort to design and make such a board. but trimming it to the minimum components may again means compromise of sorts. just that using stm32f030 would at least be s/w compatible with the current gcc tool chain
i.e. if i’m working on a stm32f030 ‘project’ i’d get that board rather than trying to trim for minimum components

Thu Jun 22, 2017 1:23 am
I’ve ordered a couple of STM8 boards from eBay, as there appears to be increasing interest in this.

Its also cropped on in this thread

I don’t know if the STM8 would be worth using for most projects, even though its cheaper than the STM32F103, but I have noticed that plenty of small devices available on eBay, like LED voltmeters and other displays and some USB current monitoring dongles I bought all use the STM8

It would be good to be able to, For Example, re-purpose a 4 digit LED volt meter into perhaps a countdown timer, or even a clock

Tue Jun 27, 2017 9:12 pm
i’d less likely use stm8s as ‘standalone’ mcus, even though they could do that. the main reason is that with 8k flash and 1k ram … 103f3.html
it would be quite a challenge to do partially what we are doing on stm32
however, it is a 8 bit device and hence would be more ‘memory efficient’ vs stm32
my thoughts are that they may make good ‘delegate’ mcus / subsystems working in conjunction with stm32

take for instance a 4×4 key pad, this would take 8 gpio pins (of course i can use resistors and do analog reads but that has its own disadvantages). i’ve thought about using shift registers but it would take 2 basic logic ic one for parallel to serial, the other for serial to parallel, takes more board space, more components and does not really reduce the interfacing pin counts to the main mcu.

in this case if space is a premium and fewer components counts is desired, stm8s could really function as a ‘delegate processor’ and perhaps interface the main mcu on i2c lines which takes just 2 pins. i’d think there are more use cases than that e.g. motor control delegate as each stepper motor possibly use 4 pins, sensor delegate, comm delegate etc

Leave a Reply

Your email address will not be published. Required fields are marked *