STM8 Core

Arduino on the STM8 (8 bit processor)
dannyf
Posts: 147
Joined: Wed May 11, 2016 4:29 pm

Re: Slighly off topic ;-)

Post by dannyf » Thu Jun 29, 2017 11:59 am

I'm not sure whether the STM8 is arm or not
Stm8 is not based on arm cortex m at all. Good old 6502 instead.

User avatar
zoomx
Posts: 525
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Slighly off topic ;-)

Post by zoomx » Thu Jun 29, 2017 12:20 pm

It is an 8 bit MCU but the instruction set seems to me totally different from the 6502 one, the architecture is Harward, it has DMA (Atmega328 does not), the A/D is 12bit instead of the usually 10. It's not that bad.

ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Slighly off topic ;-)

Post by ag123 » Thu Jun 29, 2017 4:50 pm

me too, i found those sub $1 mcus + boards somewhat 'irresistible' and got 2 pieces :lol:
the good thing about stm8s is that i think st-link v2 can be used to program those, hence this would be at least a piece of shared 'dongle' with stm32.
i'm yet to even start learning about it.
unfortunately, i think the currently the available open sourced c compiler sdcc didn't seem quite as 'industrial strength' as arm gcc compilers
http://sdcc.sourceforge.net/
debugging is also a problem in linux as it doesn't use SWD

oh the other thing is i think it runs on 3.3v, hence there'd be no issues related to 3.3v-5v interfacing with stm32
my thoughts are that these may make good i2c devices

actually i'm thinking of using it for a 4x4 keypad, for a normal 'digital' way of doing 4x4 keypads u'd need 8 pins (4 input, 4 output) for the scans, using 8 pins on a maple mini / blue pill is a sin, u'd run out of pins sooner once u do that :lol:
but if we have stm8s as a 'co-processor' e.g. handle the keypad, but it could do more than that, we can reduce a good fraction of i/o functions to a mere 2 pins on i2c, we could have the stm8s handle keypad + rotrary encoder & even some basic analog stuff & even drive motors

User avatar
Pito
Posts: 1593
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Slighly off topic ;-)

Post by Pito » Thu Jun 29, 2017 5:57 pm

This types of cpu's are not C friendly (6 registers and 20 addressing modes..). Best to program it in asm :)
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 1748
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Slighly off topic ;-)

Post by stevestrong » Thu Jun 29, 2017 7:16 pm

I think I will stick to AVR when it goes to 8 bit, I still have a couple of ATmega328p chips laying around.

User avatar
ahull
Posts: 1630
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Slighly off topic ;-)

Post by ahull » Thu Jun 29, 2017 7:50 pm

Two for a dollar sixty eight shipped. That is almost cheaper than I can buy the USB connector for. Sadly I don't currently have the time to play with them otherwise I would...
- Andy Hull -

ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Slighly off topic ;-)

Post by ag123 » Fri Jun 30, 2017 3:36 am

i actually didn't have an AVR :P
i've been pondering about it but i'm thinking that interfacing between 3.3v stm32 to 5v AVR is a hassle, i've been looking around for cheap 3.3v 8 bit mcus & i'd think stm8s is one of those which in addition can be programmed from the same st-link-v2 dongle, this saves various other accessories needed to program it

there are occasions that i struggle between deciding on using basic logic blocks e.g. those 74hcxx 40xx stuff, but those 'chips' would almost always need several different components for a particular use case. e.g. for a 4x4 keypad i can use either a multiplexer, decoder (e.g. 4-16 multiplexer) or 2 sets of shift registers (4 bits output, 4 bits input) to reduce the interfacing pin counts to stm32, and there are still necessity to set aside additional pins for clocks, output control etc, the end result is that pin counts interfacing with stm32 is not really reduced

to reduce the true pin counts interfacing with stm32 a 'co-processor' would really do that using only 2 i2c pins and the 'co-processor' is not limited to a single function device. this would really help to reduce component counts vs using basic logic blocks

of course the other way is to use the somewhat pricier 'high density' stm32 devices which can really reduce component counts to just the mcu alone
Last edited by ag123 on Fri Jun 30, 2017 3:49 am, edited 2 times in total.

User avatar
RogerClark
Posts: 7171
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Slighly off topic ;-)

Post by RogerClark » Fri Jun 30, 2017 3:40 am

I still have some AVR's but havent used them for ages.

More and more peripherals are now 3.3V, which makes the AVR boards harder to use as I need level converters (voltage dividers at the bare minimum)

I did still use an AVR a while ago as I needed a I2C slave, but we should now be able to do that with ST's core.

ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Slighly off topic ;-)

Post by ag123 » Fri Jun 30, 2017 3:51 am

the thing about a lot of those 3.3v devices e.g. stm32 is that it can run on batteries, an extreme of which is that u'd only need 2x1.5v AA or AAA batteries to power say a maple mini/blue pill, no regulators, no any 'special' circuits needed, just connect 2 AA batteries and it runs. for 5v devices i'd guess a lot of them would likely need 4x AA or AAA batteries and i'm not sure if 6v is ok for those mcus

it makes a lot of difference where portability goes

User avatar
RogerClark
Posts: 7171
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Slighly off topic ;-)

Post by RogerClark » Fri Jun 30, 2017 3:56 am

Yes.

3V operation is attractive.

Its just a shame that they are not supposed to be to tolerate the 3.7 (or max 4.2V) from Lipo

I think the practice they would probably work OK at 3.7V but its beyond the spec

Post Reply