
Demonstration applications
UM1000
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
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
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
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
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