The gateway to online resources and design support for engineers, powered by RS ComponentsAllied

+Post a new topic

Free STM8L-DISCOVERY kits for a little help

Avatar Posted by GaryJackson at

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

  • Avatar

    Posted by LStacey at

    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!

  • Avatar

    Posted by physeetcosmo at

    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!

  • Avatar

    Posted by GaryJackson at

    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....

  • Avatar

    Posted by charlie_foxtrott at

    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!

     

  • Avatar

    Posted by banjohat at

    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.

  • Avatar

    Posted by LStacey at

    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!)"

  • Avatar

    Posted by banjohat at

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

  • Avatar

    Posted by ogautherot at

    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

     

  • Avatar

    Posted by sanjaac at

    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

     

Post a reply