English
Language : 

AN2394 Datasheet, PDF (1/13 Pages) STMicroelectronics – The purpose of this application note
AN2394
Application note
STR7/STR9 audio generation with PWM
Introduction
The purpose of this application note is to provide a hardware and firmware solution to STR7
and STR9 microcontroller users for audio playback of a .WAV file.
The approach is optimized in that it uses a minimal number of components external to the
microcontroller, and offers a high degree of flexibility to the end-user for use with their own
.WAV files. There are two .WAV file parameters that can be controlled by the user; the
sample rate and the file size which depends on the application requirements. The actual
content of the .WAV file is irrelevant and may consist of speech, music, etc., and the only
limitation is the audio format. In fact, this application assumes that the .WAV file format must
be: PCM (no compression), 8000/11025/22050/44100 Hz sample rate, 8-bit and mono.
This document is structured as follows: a brief description of the .WAV file format in
Section 1. Section 2 provides a detailed description of the basics of audio playback. Finally,
Section 3 presents in detail an example of an application built around an STR711F
microcontroller and that can be easily tailored to any other STR7/STR9 microcontroller.
December 2007
Rev 1
1/13
www.st.com