background image

   

   

   

June 2009

Doc ID 14320 Rev 3

5/23

UM0501

User manual

STM8/128-EVAL demonstration firmware

Introduction

This document describes the demonstration firmware running on the STM8/128-EVAL 
evaluation board. You can use it to evaluate the capabilities of the microcontroller and the 
on-board peripherals.

The evaluation board is delivered with the demonstration firmware stored in the Flash 
program memory of the microcontroller. 

The firmware is based on the STM8S firmware library, and provides an example of how to 
use this library. It is divided into various smaller demonstration applications (demos).

In case the STM8/128-EVAL evaluation board is not factory-programmed or the 
demonstration application has been erased, you can reprogram the demonstration firmware 
into the STM8S2xx Flash memory by following the instructions provided in 

Section 3

.

For more information about the evaluation board itself, please read the evaluation board 
user manual.

Note:

To run some of the demonstration applications, the option byte must be configured 
accordingly. Refer to 

Section 2.10: BEEPER demo

.

www.st.com

Содержание STM8/128-EVAL

Страница 1: ...d on the STM8S firmware library and provides an example of how to use this library It is divided into various smaller demonstration applications demos In case the STM8 128 EVAL evaluation board is not...

Страница 2: ...nu overview 9 2 2 Welcome screen and main menu 9 2 3 Help mode 10 2 4 ADC demo 1 10 2 5 ADC demo 2 11 2 6 ADC demo 3 11 2 7 TIMER demo 12 2 8 PWM demo 1 13 2 9 PWM demo 2 14 2 10 BEEPER demo 15 2 11 M...

Страница 3: ...e keywords in bold indicate user actions on the joystick 5 way switch The KEY button 1 way switch and the RV1 potentiometer follow the conventions shown in Table 1 Up Up Up Up Up Up Left Right Left Ri...

Страница 4: ...s and sub menus To navigate the menus and sub menus perform the following actions as required RIGHT Navigates to the next menu or sub menu items on the right LEFT Navigates to the next menu or sub men...

Страница 5: ...the first line the ST logo is displayed moving on the second line and a melody is played see Figure 3 The introduction melody can be changed by using either PWM demo 1 or PWM demo 2 see Section 2 8 an...

Страница 6: ...er on the evaluation board The converted value is displayed in different ways see Figure 6 On the LCD first line in percentage of the ADC range in hexadecimal and decimal format On the LCD second line...

Страница 7: ...SART1 USART2 and buzzer as described in the previous section 2 6 ADC demo 3 This is the same as ADC demo 1 and ADC demo 2 except that the microphone U8 is used Note The JP5 jumper must be installed fo...

Страница 8: ...stick to start the timer The remaining time is displayed on the LCD screen see Figure 9 Figure 9 Remaining time message 3 When the value reaches 00 10 a sound is heard for each second elapsed When the...

Страница 9: ...ess the joystick LEFT or RIGHT to navigate the notes and use the RV1 potentiometer Then press SEL to confirm Once all the notes have been defined enter an end mark to play the melody End of notes the...

Страница 10: ...stored in the Flash memory see Figure 13 1 Navigate between the melodies by pressing the joystick LEFT or RIGHT and press SEL to select and play the melody see Figure 13 Figure 13 Selecting a melody 2...

Страница 11: ...e is entered the LSI clock is calibrated The message shown in Figure 14 is displayed at the end of calibration Figure 14 End of calibration message After a short time another message shows the current...

Страница 12: ...layed see Figure 17 Figure 17 Card detected 2 Then the MicroSD card is initialized followed by a Write block 512 bytes and a Read block operation See Figure 18 for the messages displayed consecutively...

Страница 13: ...t stops the first number then the second number etc You hit the jackpot if you get 4 identical numbers see Figure 20 Figure 20 Hitting the jackpot If you get 3 or 2 identical numbers you win a consola...

Страница 14: ...e HSI clock frequency by a divider factor 1 2 4 8 1 The new clock frequency is then displayed You can monitor the master clock frequency with an oscilloscope connected to the MCO pin Note If you selec...

Страница 15: ...o stw project by selecting File Open Workspace and browsing the demo project under STM8 128 EVAL_Demo Demo project STVD Cosmic b Configure the Debug instrument Click Debug Instrument Target Settings i...

Страница 16: ...used in each demo Table 2 Peripherals used Peripheral Demo ADC2 ADC TIMER and PWM demos EXTIT MicroSD demo GPIO All demos buttons LEDs Clock Controller All demos BEEPER Beeper demo SPI All demos LCD M...

Страница 17: ...b routines stm8_interrupt_vector c this file provides the interrupt vector table demo_xxx h header for the demo_xxx c file demo_xxx c this file provides all functions related to the xxx demo functions...

Страница 18: ...ory Table 3 Document revision history Date Revision Changes 08 Dec 2008 1 Initial release 02 Mar 2009 2 Added Section 3 Upgrading the demonstration firmware 17 Jun 2009 3 Added note about JP5 in Secti...

Страница 19: ...ARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLE...

Отзывы: