
UM1000
Demonstration applications
Doc ID 17964 Rev 1
3.8 Audio
demo
3.8.1 Voice
recorder
demo
The STM8L15x microcontroller features timers and an ADC which can be used respectively
for timing and signal acquisition.
In this demo, Timer 1 (TIM1) is used to generate an update interrupt every 45.35
µ
s
(22.05 kHz), which corresponds to the voice sampling period. This update event triggers the
ADC voice acquisition. Voice data is saved on the on-board SPI Flash memory.
When the Voice Recorder is selected from the AUDIO menu by pressing
SEL
on the
joystick, 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 previously stored on the on-board Flash memory. The message shown in
remains displayed until the erase operation is complete.
Figure 37.
Erase Flash message
When the erase operation is complete, the message shown in
is displayed:
Figure 38.
Voice recorder message
When
SEL
is pressed, the STM8L15x starts recording voice and the displays the message
shown in
:
Figure 39.
Stop voice recorder message
Voice Recorder
Voice REC Start
Voice Recorder
SPI Flash Erase
Voice Recorder
Record:PressSEL
Voice Recorder
Stop:In 30s/UP
www.BDTIC.com/ST