ST STM8L1528-EVAL User Manual Download Page 18

Demonstration applications

UM1000

18/23

Doc ID 17964 Rev 1

To stop recording, press the 

joystick UP

, otherwise the STM8L15x will stop recording 

automatically after 30 s and the message shown in 

Figure 40

 will be displayed:

Figure 40.

End voice recorder message

3.8.2 Voice 

player 

demo

The STM8L15x microcontroller features an embedded DAC which can be used to generate 
output signals. 

In this demo, the DAC regenerates the voice signal recorded in the SPI Flash memory. 
Timer 4 (TIM4) triggers the DAC to generate the voice signal every 45.35

µ

s (22.05 kHz) 

which corresponds to the voice sampling period. 

When the Recorded voice is selected from the Audio Player submenu by pressing the 

SEL 

on the joystick, The following message remains displayed unless 

SEL

 is pressed.

Figure 41.

Audio Player menu message

When 

SEL

 is pressed, the STM8L15x starts playing the voice, and the message shown in 

Figure 42

 is displayed.

Figure 42.

Play voice recorded message

At first time when running the recorded voice demo, the STM8L15x check for the existence 
for a record in the external SPI Flash memory and play it, otherwise the message shown in 

Figure 43

 is displayed for two seconds then voice player menu is displayed again.

Figure 43.

No recorded voice message

To stop the voice player demo, press the joystick 

UP

. The message shown on 

Figure 41

 is 

then displayed. Otherwise, the STM8L15x will stop automatically at the end of the wave.

AUDIO

Voice Recorder

Audio Player

Recorded Voice

 

Recorded Voice

Play

No Recorded

Voice

www.BDTIC.com/ST

Summary of Contents for STM8L1528-EVAL

Page 1: ...stored in the Flash program memory of the microcontroller The firmware is based on the STM8L15x firmware library and provides an example of how to use this library It is divided into various smaller...

Page 2: ...e time 7 3 4 2 Setting the date 8 3 4 3 Setting the alarm 9 3 5 Thermometer demo 10 3 6 IDD measurement demo 11 3 7 Low power demo 12 3 7 1 Run mode 12 3 7 2 Wait for interrupt mode 12 3 7 3 Wait for...

Page 3: ...nt the keywords in bold indicate user actions on the joystick 5 way switch and the RV3 potentiometer The present document follows the conventions shown in Table 1 Up Up Up Up Up Up Left Right Left Rig...

Page 4: ...menu items on the left SEL Enters submenu UP Exits from a submenu 2 4 STM8L1528 EVAL board jumper configuration To be able to run the STM8L1528 EVAL demo correctly configure the following STM8L1528 EV...

Page 5: ...part of the demonstration firmware STM8L1528 Welcome message Main menu HELP HELP CALENDAR Date THERMOMETER About Adjust Show Time Adjust Show Alarm Adjust Show Low Power Audio Audio Player Voice Recor...

Page 6: ...sage The main menu is then activated and the message shown in Figure 4 is displayed Figure 4 Main menu 3 3 Help mode Pressing SEL from the main menu enters the Help mode The following messages are dis...

Page 7: ...displayed to show the current time value see Figure 6 2 Enter the first digit of the hour field Pressing the joystick UP increments the current digit value Pressing the joystick DOWN decrements the cu...

Page 8: ...digit value Pressing the joystick DOWN decrements the current digit value The digit value is limited to a range depending on the date field month day or year 3 After selecting the digit value press SE...

Page 9: ...is displayed Figure 10 Alarm Adjust message Alarm show Select the Alarm show option to display the current alarm After power up the default alarm time 00 00 00 is displayed till the Alarm adjust optio...

Page 10: ...When the joystick RIGHT is pressed the temperature in degrees Fahrenheit is displayed on LCD screen as shown in Figure 14 for two seconds then the temperature in degrees Celsius is displayed again Fi...

Page 11: ...own in Figure 16 is displayed Figure 16 Temperature sensor error message 3 6 IDD measurement demo The STM8L15x microcontroller features an ADC peripheral It measures the IDD current in Run mode by usi...

Page 12: ...mode submenu contains four submenu items 8 MHz the application runs at 8 MHz 4 MHz the application runs at 4 MHz 2 MHz the application runs at 2 MHz 16 MHz the application runs at 16 MHz Press SEL to...

Page 13: ...hen the alarm time is reached the system exits from WFI mode the system clock frequency is set to 16 MHz and the application execution resumes The message shown in Figure 23 is then displayed on the L...

Page 14: ...e system exits from WFE mode and the application execution resumes The message shown in Figure 27 is then displayed on the LCD screen Figure 27 Exit from WFE with comparator interrupt message Note If...

Page 15: ...upt wakes up the device then all LEDs are ON and a sound is played for 10s The RTC alarm wakes up the MCU from Active halt mode The LEDs blink until SEL is pressed from the Active halt menu see Figure...

Page 16: ...Halt mode the system clock is set to 16 MHz and the application execution resumes The following message is displayed on the LCD Figure 33 Exit from Halt with EXTI message A Comparator 1 interrupt can...

Page 17: ...the following message is displayed on the LCD screen Figure 36 Start voice recorder message This message remains displayed until SEL is pressed The STM8L15x then starts erasing the voice data previous...

Page 18: ...bmenu by pressing the SEL on the joystick The following message remains displayed unless SEL is pressed Figure 41 Audio Player menu message When SEL is pressed the STM8L15x starts playing the voice an...

Page 19: ...time of sampling Sample rate may be 8000 11025 22050 or 44100 Hz Bits Per Sample 8 bit Audio sample data values are in the range 0 255 Number of Channels 1 Mono The maximum wave files number that can...

Page 20: ...and the menu shown in Figure 47 is displayed When the audio stream is stopped the stream position is reset and the menu shown in Figure 44 is displayed Note If the SD card is removed the demo will sto...

Page 21: ...folder to your own SD memory 4 2 Programming the demonstration To upgrade the demonstration firmware running on your board perform the following steps 1 Download the latest version of STM8L1528 EVAL d...

Page 22: ...mo ADC1 IDD measurement Voice recorder DAC Audio Player COMP 1 Low power External interrupts EXTI Low Power GPIO All demo Clock controller All demo I2C1 Thermometer Audio Player TIM1 Voice recorder TI...

Page 23: ...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 UNLESS EXPRES...

Reviews: