English
Language : 

AN3225 Datasheet, PDF (1/13 Pages) STMicroelectronics – Audio software codec
AN3225
Application note
Audio software codec
for STM8L15xxx and STM8AL31xx/STM8AL3Lxx
Introduction
This application note describes a simple and easy-to-use solution to help design and
develop products with an audio output, for example, toys, alarms, door bells, and white
goods.
Audio data generally require the storage of a lot of memory. However, the memory space
needed to preserve such data can be reduced by compressing the audio data via a
specified compression method. Processing these data is usually a complex task requiring
powerful microcontrollers such as DSP or audio chip. Normally, 8-bit microcontrollers do not
offer either a large memory or a high computing performance.
The software solution offered in this application note reconstructs audio signals from
compressed samples. A simple audio codec based on an adaptive differential pulse coded
modulation (ADPCM) algorithm is used and advantage is taken of the advanced
STM8L/STM8AL core with its 3-staged pipeline and 16 MIPS peak performance.
The digital samples are converted to an analog signal by an on-chip, 12-bit, digital-to-analog
converter (DAC). This offers good overall audio quality, yet is a cost-effective solution for 8-
bit microcontroller applications.
The battery-powered application benefits from the ultra low-power consumption of
STM8L/STM8AL microcontrollers.
The example firmware and application hardware design are provided with this application
note to enable easy porting of the offered solution to the final application.
Table 1 summarizes the products covered by this application note.
Table 1. Applicable products
Product family
Part numbers
Microcontrollers
– STM8L151x4, STM8L151x6, STM8L152x4, STM8L152x6
– STM8L151x8, STM8L152x8, STM8L151R6, STM8L152R6,
STM8L162R8, STM8L162M8
– STM8AL313x, STM8AL314x, STM8AL316x, STM8AL3L4x,
STM8AL3L6x
November 2012
Doc ID 17566 Rev 3
1/13
www.st.com