background image

UM0501

Demonstration applications

Doc ID 14320 Rev 3

9/23

   

   

   

2 Demonstration 

applications

2.1 Menu 

overview

The 

Figure 2

 shows all the menu and submenus of the demonstration applications. 

Figure 2.

Menu overview

The following sections provides a detailed description of each part of the demonstration 
firmware. 

2.2 

Welcome screen and main menu

After a board RESET,

 

a welcome message is displayed on 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

 

and

 

Section 2.9

).

Figure 3.

Welcome message

Once the melody is played, the main menu is activated and the message shown in 

Figure 4

 

is displayed. 

Figure 4.

Main menu

Note:

Pressing the joystick in any direction (for around 1 second) ends the melody.

ABOUT

WELCOME MESSAGE

ADC DEMO1

HELP

ADC

MAIN MENU

TIMER

MICROSD 

ADC DEMO2

ADC DEMO3

GAME

PWM1

PWM2

SYSTEM

PWM

BEEPER

STM8-128K Demo

ST

** MENU **

HELP - push SEL

Содержание 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...

Отзывы: