Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

STMicro STM8S-Discovery USB EVBU (under $10) ???

Status
Not open for further replies.

Mike - K8LH

Well-Known Member
Anyone familiar with the STMicro STM8S microcontrollers? I just ran across a promotion on their STM8S-Discovery EVBU and at the price ($7.50 @ Digikey) it seems interesting...

Mike, K8LH
 
Last edited:
It's been $7 for a long time, or maybe they just re-saled it again.
https://hackaday.com/2009/11/23/stm8s-discovery-microcontrollers-reach-a-new-low/

It's interesting, but I don't see anything that distinguishes it from the other 8bits.

I've pushed this before, but it's hard to justify learning another 8bit which is limited in its range when you can get a LPC1313 32bit Cortex-M3 for $4 individual that has the same memory 32K Flash, 8K RAM and runs at 72Mhz. And that same family scales down to 8K parts or up to 512K 120Mhz parts and you still are using the same development tools and architecture. ..or even CM0 LPC11xx low power parts, same devel environment.
 
Last edited:
Dude i think i heard somewhere you cant reprogram that.. like you can reuse it really.. but im sure i read it wrong... would be nice to play with tho!!!
 
It seems like half of this Discovery kit is a USB programmer/debug interface but I need to read a bit more about it to make sure...
 
Yes, it includes the programmer/debugger right in it and it is a nice 8bit chip. The only issue I would have with it is the development environments they list available are commercial ones with 16K limits. They are great up until that point you want to use more. I'm too lazy to look to see if there are any free alternative. Also the RAM is fairly low. 2K for a 32K flash part, but it has a nice built in EEPROM.
 
Last edited:
I ordered mines on 2/25/2010 ... should be here soon! I hope :D

Will surely play with it and reply with more info...

Wow! I'm recommending it to my friends too.

By the way - this thing when detached, looks like an ICSP to me. If so, I might make cool solutions and with custom made circuit without using that training board! :D
 
Im about to make a Blink sample... Ill try to use the TSL (touch sensing lib) but no guarantee heh.......... ill try a normal blink first
 
They have so many files to look over heh.. I got blinking a LED down heh simple... they do provide nice samples. Just so many!!! lol
I changed it so i can use my own LED and be faster blinks....works nice!
Code:
#include "stm8s.h"
int delay = 20000;

int main(void) {
    
    // Reset ("de-initialise") GPIO port B.
    GPIO_DeInit(GPIOB);
    
    // Initialise pin 0 of port B.
    GPIO_Init(GPIOB, GPIO_PIN_7, GPIO_MODE_OUT_PP_LOW_FAST);
    
    // Infinite loop.
    for(;;) {
        
        // Delay for a short while.
        u16 d;
        for (d = 0; d < delay; ++d) {
            // Without a nop() in here, the entire loop would be optimised away!
            nop();
        }
        
        // Invert the LED pin's state to flash it.
        GPIO_WriteReverse(GPIOB, GPIO_PIN_7);
    }
}

https://www.youtube.com/watch?v=MVzvjsLrI9U

Clean more user friendly version:
Code:
#include "stm8s.h"
int speed = 10000;

#define LED_PORT   GPIOB
#define LED1 		   GPIO_PIN_7

int main(void) {
    
    GPIO_DeInit(LED_PORT);
    GPIO_Init(LED_PORT, LED1, GPIO_MODE_OUT_PP_LOW_FAST);
    
    while(1) {
        
        int d;
        for (d = 0; d < speed; ++d) {
            nop();
        }
        
        GPIO_WriteReverse(LED_PORT, LED1);
    }
}
 
Last edited:
I've just ordered one of these samples. I hope it'll reach here by the next day. :D

By the way, many of those ST microcontrollers aren't in DIP form. If I could just make a simple SMD breakout adapter that'll be easy and good, since this microcontroller is pretty good too.
 
They have so many files to look over heh.. I got blinking a LED down heh simple... they do provide nice samples. Just so many!!! lol
I changed it so i can use my own LED and be faster blinks....works nice!
Code:
#include "stm8s.h"
int delay = 20000;

int main(void) {
    
    // Reset ("de-initialise") GPIO port B.
    GPIO_DeInit(GPIOB);
    
    // Initialise pin 0 of port B.
    GPIO_Init(GPIOB, GPIO_PIN_7, GPIO_MODE_OUT_PP_LOW_FAST);
    
    // Infinite loop.
    for(;;) {
        
        // Delay for a short while.
        u16 d;
        for (d = 0; d < delay; ++d) {
            // Without a nop() in here, the entire loop would be optimised away!
            nop();
        }
        
        // Invert the LED pin's state to flash it.
        GPIO_WriteReverse(GPIOB, GPIO_PIN_7);
    }
}
YouTube - STM8S-Discovery test

Clean more user friendly version:
Code:
#include "stm8s.h"
int speed = 10000;

#define LED_PORT   GPIOB
#define LED1            GPIO_PIN_7

int main(void) {
    
    GPIO_DeInit(LED_PORT);
    GPIO_Init(LED_PORT, LED1, GPIO_MODE_OUT_PP_LOW_FAST);
    
    while(1) {
        
        int d;
        for (d = 0; d < speed; ++d) {
            nop();
        }
        
        GPIO_WriteReverse(LED_PORT, LED1);
    }
}

Well done Jason (AtomSoft). Way to go!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top