UM0891
Running the demonstration
Doc ID 16982 Rev 1
the wave signal. The voice sampling period is read from the Wave File Header. An audio
amplifier is connected to the DAC interface to play the stored wave files. This application
illustrates all STM32 DAC features and modes by dedicated examples and lists the
configuration steps for each mode.
This application reads all wave files from the USER directory (see
) and displays only the .WAV files having the following format:
●
Audio format: PCM (an uncompressed wave data format in which each value
represents the amplitude of the signal at the 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
Wave Player
submenu is shown in
Figure 34.
Wave Player submenu
When you select Wave Player, the wave player interface is displayed as shown in
Figure 35.
Wave Player interface
In
, the active push-buttons and their functions are displayed. For example, at
start-up, to play the file through the embedded speaker, press SEL. To exit the
Wave Player
submenu, press DOWN.
Once you select the play command, the submenu shown in
is displayed.
Wave Player
Return
Wave Player
SEL
DOWN
LEFT
RIGHT -> Previous Wave
USER/xxxxxxxx.WAV
-> Play
-> Next Wave
-> Return
STM32 DAC Audio demo
Playing Wave Files