STM8S

can somebody tell me the pro's and cons of STM8S vs Auduino

Well, if the $10 "STM85 DISCOVERY" board does what you want and you don't need the support of a large community or an Arduino shield to simplify interfacing to complex hardware or an Arduino library for simplifying your programming effort or a processor available in DIP packaging or a non-Windows programming environment then the STM85 might be an excellent choice.

i was thinking along the same lines !

what language is used to program it ?

Perhaps one of the documents on this page would help with your question:

Probably this one:
Developing and debugging your STM8S-DISCOVERY application code (UM0834)

can somebody tell me the pro's and cons of STM8S vs Auduino

For the "STM85 DISCOVERY" board, the license agreement...
http://www.st.com/internet/com/LEGAL_RESOURCES/LEGAL_AGREEMENT/LICENSE_AGREEMENT/EvaluationProductLicenseAgreement.pdf

Mon Oct 05 10:14:44 AEDT 2015
I use the STM8S. I was given some for my Electronics Club. http://www.meetup.com/Electronics-Club-Altona/
I have also explored a few other micro-controllers and the there are a few now that use the Arduino shield format to permit interface with other hardware. It took me a while to get into the STM8S but I seem to be quite happy with it now. The IDE is not so bad - I quite like it. You have to supply your email to get a license code - I don't have an issue with that. You have to choose between small size generated code(unlimited time) and time limited larger code space. Start of with small stuff.
I am considering an Arduino shield interface board - to provide i/o in standard Arduino format. Other micro-controllers like Cypress, PICAXE and Intel Edison ? do this...

The code is written in C and I plan to upload some examples to github soon. GitHub - MatrixMike/stm8s: STM8S discovery board

matrixmike31 >> hi there..
i bought one of them clock DIY clock kits on ebay. china made, bout $7.00
the clock has such a processor on it.. but it only displays the 24hr time and temp is in C*
do you have any experience to help me reprogram this to have 12/24 hr time and temp in F* ?

I've bought a handful of the STM8S103F3P6 "minimum system development boards" that are ~$1 US on ebay and have been playing with them. I've set up a couple of different tool chains including

  1. The open source SDCC + stm8Flash which works, though I haven't figured out how to access certain features (halt / auto wakeup). There isn't, to my knowledge, open source support for the debug features. There is a manual, but it is lacking and I haven't found much in the way of source examples and I had to make up my own version of the peripheral mapping files for this particular STM8 variant.

  2. IAR toolset is one of the "professional" tool sets. It is limited to 8k compiled code in the free trial version, but this STM8 variant only has 8k flash so that's not a concern. The learning curve is pretty steep with this tool, but there is a rather large manual for it. It includes both a software simulator with source level debugging and support for the in circuit real time debugging capability of the chip itself via the SWIM interface. That is a very powerful tool and a distinct advantage over the Atmel stuff.

  3. STM Visual Development with COSMIC compiler is another "professional" IDE with a demo version of the compiler a bit more hobbled than IAR. It also has software and in circuit debugging tools. I used this to make it easier to assemble a modified version of eForth I found since it was originally developed in that environment.

The STM8S103F3P6 is a more constrained device than any Arduino (8k flash, 1k RAM, 640 bytes EEPROM) but has a good set of hardware peripherals (UART, I2C, SPI, ADC, 3 timers, up to 16 GPIO).

The big disadvantage relative to Arduino is that setting up and understanding the toolchain is much more time consuming and you will not find ready made libraries and the abundance of examples that have come out of the Arduino ecosystem. Getting any non-trivial sensor working this the STM8 is going to take many times longer to get working than with Arduino because of this. Given that clone Pro Mini's can be had on ebay for not much more, I'm not sure there's a really compelling reason to favor the cheap STM8s.

I bought the STM8S103P3 on a whim. It was 99 cents.

What do people use these for?

ieee488:
I bought the STM8S103F3P6 on a whim. It was 99 cents.

What do people use these for?

In looking around for code samples, it seems like most of what is available is targeted to the STM8S Discovery board which uses the STM8S105C6 processor. That variant is roughly the equivalent to the Atmega328P in memory capacity and embedded peripherals while the STM8S103F3P6 has 1/4 the flash memory and 1/2 the RAM.

The GPIO allotment is different between the two devices so porting code involves changing the GPIO mapping. Also the embedded peripherals (e.g. UART) are mapped differently in memory space and have somewhat different register sets, so that has to be accounted for. Finally, the Discovery board has an external crystal oscillator and the cheap STM8S103F3P6 doesn't so porting involves correctly configuring the oscillator. Both devices default to the internal oscillator (16 MHz with a divide by 8 -> 2 MHz), so Discovery code often has an explicit switch to the external 16 MHz oscillator so for compatibility one must configure the internal oscillator to run full speed.

As mentioned above, I have an eForth kernal running on a STM8S103F3P6. This involved changes to the oscillator and UART setup as well as remapping the program and data stack to fit within the STM8S103F3P6 RAM space. The program is in assembly and was built under the STM Visual Development assembler. There isn't much RAM space left for interactive programming, but it's kind of amusing that a self-hosted interactive development works at all on such a device, and it's not a bad environment for interactively exploring the peripheral set.

My mid-range objective is to build a wireless temperature monitoring node. I've got working code for a single DS18B20 based on some OneWire source I found, complicated somewhat by the code being commented in Chinese. I've got some working code snippets that exercise the low power modes with auto wakeup. The remaining hurdles are to port VirtualWire or something like it to the STM8 and to hack up the board to remove the regulator and power LED to get to a micropower sleep state.

MrMark,
I bought some cheap STM8 board and got the same conclusions. I believe too that LowPower can be the only advantage.
But I don't know if a 3.3v Atmel 328P or an MSP430 (using Energia) can be better.

MrMark:
In looking around for code samples, it seems like most of what is available is targeted to the STM8S Discovery board which uses the STM8S105C6 processor. That variant is roughly the equivalent to the Atmega328P in memory capacity and embedded peripherals while the STM8S103P3 has ¼ the flash memory and ½ the RAM.

So is this (presumably) the same for the STM8S103F3P6 which is the present cheap version on a module?

Paul__B:
So is this (presumably) the same for the STM8S103F3P6 which is the present cheap version on a module?

That's exactly the board I'm using, some of my part numbering above was incorrect (and inconsistent). I've corrected the posts above to use the full part number. Apologies for any confusion.

So I should not be so enthusiastic about them then? Less RAM and program space.

The STM8S103F3P6 is a more constrained device than any Arduino (8k flash, 1k RAM, 640 bytes EEPROM)

So I should not be so enthusiastic about them then? Less RAM and program space.

They're approximately equivalent to the ATmega8 from the original Arduino, which were sufficient for a lot of things. Being able to get one mounted on a breakout board for $1 is pretty attractive, but of course they're harder to use, and it's not THAT different in price from the pro-mini clones with a better CPU AND full Arduino support...

So these have a USB programming interface and can presumably be used as HID or serial interface. Is this hardware or software ("V-USB")?

USB is power only, I think.

I'm getting less enthusiastic ...

Yes, the microUSB connector is power only. There is no bootloader ala Arduino, so programming must be done with a ST-Link V2 USB programmer/emulator interface. These can be had for about $6 on ebay. The same device supports the various (and more compelling) generic STM32 boards one finds on ebay.

The upside of having to use ST-Link for programming is that it supports in-circuit source-level debugging so one can single step through code, examine/modify registers and memory, set breakpoints on instructions or memory access and so forth. This is a powerful capability at the price point.

The board, as shown below, consists of microUSB for power, an AMS1117 3.3 V regulator, power LED, 1 GPIO LED, a reset switch, and breakout to all microcontroller pins including a separate breakout to the program/debug interface.

these are significantly more capable than low end avr although not more so than mid/high end members. their main advantage is they cost less than 1/10th as much as comparable avr. as usual what i mean by that is you can buy 10 or a dozen for the price of one comparable avr chip. this is important if you are a manufacturer, maybe not so much for hobbyist.

either way the 99 cent dev board is a deal. i have not used one myself but instead prefer tacking a cheep chip onto 10 cent breakout. total cost about 25 cents. again, you can have several of these for the cost of a pro-mini or nano.

another big plus is the clean symmetrical isa reminiscent of avr and 6502, all of which are based on the revolutionary (at the time) dec pdp11. personally i am a load/store kinda guy.

as far as usb, yes it can be used to talk to pc. i have personally implemented stm8 code for hid. that particular project asm although sdcc is one of my favorite compilers in the whole world. you might guess this knowing i favor msdos over windows, linux, and gcc bs for this level of programming and am a big fan of borland turbo c.