Skip to content | Skip to navigation
Powered by RSPowered by RSPowered by RS

Free STM8L-DISCOVERY kits for a little help

GaryJackson


Okay, so please cut me a little slack before laying into me, yes I do work for an ARM Cortex leading licensee and a major semiconductor supplier with a long history of 8-bit micros, but I'm in sales not applications. I can sell all the benefits and features of STM8, STM32 and Cortex-M3 with the best (M0 & M4 too soon!), but to be honest, since my basic microcontroller 101 lessons at Uni some (ahem) years ago I haven't tried to write code for a micro full stop. Sadly I was taught programming with Visual Basic, Assembler and Turbo Pascal (remember that 'record' fans?) so sadly C/C++ wasn't part of the curriculum on my course.

Anyway with a little reading-up I've got the basics of C sorted in my head and as I recently over-ordered load of STM8L-DISCOVERY kits for a recent promotion, I thought I'd have a go at actually writing a simple app using this board and IAR's free kick-start Workbench for STM8.

After 30 mins or so, and a couple of calls to my friendly apps engineer in our UK office I managed to tweak the default app and load it back onto the board to scroll some shall we say 'more entertaining' text across the LCD display and flash the green and blue LED's in a way that got me sadly excited!

Anyway, given my very limited micro and C knowledge I thought I'd drop a note on DesignSpark to all you clever micro code developers to see if you could aid my learning curve.

Here's my offer, if you think you could write some simple but helpful, well commented code for the STM8L-DISCOVERY board please post below what you would write that would help me learn a little more about coding for micros. The more entertaining the better.

As I work for STMicroelectronics, I guess I better point out that as this is for me and I have no formal agreement with my employer behind this, you need to be prepared to make the s/w freely available to me and others on this website and therefore not need any IP protection. Believe me I'm not looking for the next killer app, getting my head around that would probably kill me.

The offer? I'll trawl through the proposals and the best 15 that catch my imagination will each receive one of the spare STM8L-DISCOVERY boards currently cluttering up my kitchen worktop. Remember I'm not looking for stunning applications, just some basics that will help me and perhaps some other micro newbies learn a bit more.

By the way, as I have only the free KickStart version of their software, you have only 8k flash to play with, not the 32k available on the device.

Cheers

Gary

Here is a link to the STM8L-DISCOVERY board so you know the hardware available to work with.

LINK

Here is a link to the IAR WorkBecnh KickStart you'll need to use, as I can't start to learn anything else just yet, not even our own IDE!

LINK

Replies

InfinitRED ...

United Kingdom

1 year ago

What is this board exactly? Don't tell me that this stuff is serious... i am just a newbie =3

jimloko

Australia

1 year ago

Hello,

Its done, i have finished and uploaded my app.  The Word Game project source is available also.  Check it out here:

http://www.designspark.com/knowledge/stm8-word-game

Enjoy :)

cheers,
James

julian160784

Indonesia

1 year ago

Hi,

I am Julian from Indonesia.

 

I would like to write you a code implementing automatic SLA battery charger. It will use ADC, current sensor, temperature sensor, LCD and PWM to control the charging process. First The ADC will check the battery existence and determining wether to trickle charge or slow charge or maybe even fast charge the battery by testing the capacity of the battery. Then while charging the battery the microcontroller will check for temperature and current that flow into the battery and make the right decision with it.

Nice to hear this offer from you,

Thanks,

Julian.

GaryJackson


1 year ago

Hi Julian

As with the apps from Chris, probably a little advanced for me, but I'm sure I'll learn something from them. A battery sensor/charger application sounds like it too could be useful for other forum members so I'll send you a board for you to get cracking. Send me a private message with your address for the board.

Gary 

matzitek

South Africa

1 year ago

Hi Gary

Thanks for the offer. I would like to make a contribution, if your offer still stands. I don't have any particular application in mind - you can choose from any of the following: Fuzzy logic control, Kalman filter, motor speed control. There's more - perhaps you might want to look at some of my articles on my website at http://matzitek.com/index.php/download.

I have more than 30 years' experience in microcontrollers, with more than 10 years of C programming.

Regards,

Chris

GaryJackson


1 year ago

Hi Chris

Possibly a little advanced for what I need right now, but I'm sure these would be really useful resources for others, so send me a private message with your address and I'll send you one of the remaining boards.

I don't know how much time you can spare to do all the apps you mentioned, but any you can will be appreciated by the forum users I'm sure.

Thanks

Gary

Adelphi

United Kingdom

1 year ago

Gary,

I'm in the same boat as you. I write software for Freescale uPs in assembler - but I want to learn to write in C /C++. The biggest problem I see at the moment is that my 'skills' are not very portable. If I want to work on another processor - I have to learn the instruction set. ( I think i know the HCS12 one off by heart !)

 

So - whilst I can't offer the same as everyone else has i.e. I can't currently write any C for you to try, can I offer this ....

 

If you send me a demo board - i will have a go at learning a) to use the STM8 and b) any code that I 'port' from my assembler based HCS12 domain over to C/C++ STM8 to help me learn - I will put on here to help you and / or others.

 

Is that any good for an offer ?

 

Thanks

 

Andy

GaryJackson


1 year ago

It's important to comment the code well and to be of help to those that are also trying the migration from ASM to C it would be good if you could include a document explaining anything you have had to approach differently. Message me with your address and the board is on it's way. Gary

jimloko

Australia

1 year ago

Hello,

Well.

I like flashing lights, and i like games.  So how about a word game that randomly displays words, and you have to push the button when a certain word or word within a category appears.  It would use the LEDs to show correct / incorrect.

It could also measure your response time and and display on the LCD.

Areas covered: Multidimensional Arrays to store word categories, Random number generator, reading inputs (button and de-bouncing), Writing to the LCD, Setting outputs (LED), Working with timers...

Cheers,
James

GaryJackson


1 year ago

Sounds like fun and should demonstrate several peripherals running, so why not. Upload the project to KNOWLEDGE and send me you address for board.

 

awneil

United Kingdom

1 year ago

You mean this one: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/... ?

If you take a look at this album: http://www.facebook.com/album.php?aid=35687&l=1d70593976&id=1074... you should be able to see an STM32 Discovery on the lefthand side - it was doing a "running lights" display (gotta have flashing lights somewhere!)

I guess I could reprise that for you on the STM8 Discovery...?

Note also the cunning trick for mounting it onto breadboards...

Andy.

ujwalks22

India

1 year ago

Hi,

I would like to write a code to implement a Line following Robo,which uses ADC for Sensor input,LCD to visualise/debug the inputs of sensor being recieved,Low-Power mode to save power instead of using delay as the MCU is fast for the robo to follow steep curves and PWM to control power to motor.

Chasse

New Zealand

1 year ago

Damn,

I wish I knew enough to be able to suggest an app for one of those but to much of a electronic newb and don't know enough about arm to even use one, oh well maybe next time.

awneil

United Kingdom

1 year ago

"don't know enough about arm to even use one"

Note that the STM8 is not an ARM!

The STM8, as the name suggests, is an 8-bit processor.

It's the STM32 that's the ARM - a Cortex-M3, to be precise...

LStacey

United Kingdom

1 year ago

I'm sure we can help you with that one. Stick around and watch this thread. Looks like there's some cool stuff happening. Hopefully we can all learn a thing or two!

hrdevsingh

India

1 year ago

Hi Gary

I would write some code to implement a simple sine wave inverter using Hbridge output

Some of Demonstrated MCU peripherals will be ADC, Timer, Interrupts, LCD driver etc

Hrdev Singh

GaryJackson


1 year ago

Okay, yes please upload the project to KNOWLEDGE and message me your postal address for the board. Please remember to comment the code well to help interpretation of what's going on in the application.

Thanks

Gary

10 boards remaining...

sanjaac

Germany

1 year ago

Hi.

I would write some code to implement an ADC to PC and SPI gateway: iteratively sample an ADC channel with a Timer, put data in ping-pong buffers, also send the data right away to a FIFO with given legth, show in LEDs the FIFO status (full/empty); have the UART sending formatted data to a PC continuously from the FIFO. Use pushbuttons to temporarily disable UART communication (show FIFO filling up). Also, stream the ADC data via DMA from ping-pong buffers to SPI. Additionally, show measured temperature inside the MCU on the LCD screen.

Demo'ed concepts:
- Ping-pong buffers (useful for real-time data capture)
- FIFO (useful for transferring ordered data between subystems with different burst rates)
- Data transfers via DMA

Demo'ed MCU featured/peripherals:
- ADC
- Timer
- Interrupts
- GPIO
- UART
- LCD driver
- Temperature sensor
- SPI

I hoped I raised your attention, and will get one of those toys soon!

Regards

 

GaryJackson


1 year ago

Wow, this looks like a chunky project, maybe a little advanced for me right now, but as it demonstrates so many peripherals I think it could be a very useful to other 8-bit micro learners. Hopefuly soon enough I'll be up to speed to appreicate this.

Upload this to KNOWLEDGE and then message me your postal address for the board.

Thanks

Gary

11 boards remaining...

ogautherot

Chile

1 year ago

Hi Gary! Interesting offer. I could offer something like a frequency meter using an input and the LCD panel. I can also prepare some basic apps on the various modules. I've added a note on the Knowledge page.

By the way, we could have use for the eval board here - in the office and some friends.

 

Hope it helps

Olivier

 

GaryJackson


1 year ago

Just looked at your KNOWLEDGE post. If you can upload a project to do what you described above that will definitely qualify. Just update me when it's there and message me with your postal address for the board.

Thanks

Gary

12 boards remaining...

LStacey

United Kingdom

1 year ago

Love it!

"While pointers and structures might all be fine and dandy, I think that knowledge about interrupts and converters might be handy. (haha, poems!)"

banjohat

Denmark

1 year ago

Thanks :) It's amazing what can happen during classes ;)

banjohat

Denmark

1 year ago

While pointers and structures might all be fine and dandy, I think that knowledge about interrupts and converters might be handy. (haha, poems!)

 

On a more serious note, being able to read a channel of the AD-converter and send the result to a computer is usually a very nice feature!

I would make a simple program that would do the following:

Initialize an ISR that will do the conversion and send the output to the serial port and/or the display.

This would require the setup of timers, interrupts, the serial port and the display. All in all some of the 'basic' hardware functions available in the chip - which is very nice to know how to use.

GaryJackson


1 year ago

This sounds very useful. are you able to save this code in a project using IAR's STM8 workbench and post it on DesignSpark? I'll send you a board if you can and if you message me with your postal address.

Cheers

Gary

PS Your use of English is better than mine!! Although I'm not sure about the whole concept of technical poetry, not sure it will catch on :-)

13 boards left....

physeetcosmo

United States

1 year ago

I would write up a small program that uses pointers and data structures to demonstrate the functionality of those concepts in an embedded environment. Data structures and pointers are fundamental elements of the C language and are used near ad infinitum and can be very powerful processing and dynamic structuring tools.

 

Would you like me to post code now, or if I am chosen?

 

Hope you get some good info!

charlie_fox ...

United States

1 year ago

After you grok pointers, I'd suggest bit-wise operators followed by interrupts and timers/counters/PWM as must-have uC knowledge. Then, you should be able to brute-force nearly any project.

The next step up is getting to know UART/SPI/I2C/1-Wire communications to open up your world.

Unfortunately, I don't have the time to play, but Google as well as the uC datasheet should point you in the right direction.

Paramount: Learn how to use the debugger! Otherwise, you'll find C/C++ a mind-numbing drag.

Good luck!

 

GaryJackson


1 year ago

Thanks for the advice. I've been playing with the watch window, but not started with the debugger yet, I'll add that to my list. Gary

GaryJackson


1 year ago

Thanks for your offer, sounds great. Everything I have read on pointers in the text books has seemed more approriate to PC programming than an embedded ennvironment, so I'm sure this will help my understanding.

As you are the first to reply I will send the first of the boards to you. I'll drop it in the post tomorrow morning. Send me the address you want the board to be sent to in a private message.

It might be good if you can run the code you have written on the board when it arrives then post the project in a form that can be loaded directly onto the board for all to access and use easily.

Thanks again

Gary

14 STM8L-DISCOVERY boards left....

LStacey

United Kingdom

1 year ago

A note to anyone that might want to submit some code, you can do so by adding a knowledge item here:

http://www.designspark.com/node/add/knowledge

To make life easier, below the post there is a field named "theme". If you select "ST8M-L" in that box, it will make it easier to find your posts.

Hope you get everything you need, Gary!