English
Language : 

AN3143 Datasheet, PDF (1/13 Pages) STMicroelectronics – Audio software codec for the STM8S
AN3143
Application note
Audio software codec for the STM8S
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, white goods, washing machines,
and alarms.
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 a complex task requiring powerful
microcontrollers such as DSP or audio chip. Usually, 8-bit microcontrolles 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 STM8S
core with its 3-staged pipeline and 16 or 24 MIPS peak performance.
The digital samples are usually converted to an analog signal by some external or onchip
digital-to-analog converter (DAC). There are a lot of applications where the high fidelity
audio output is not a priority and/or the use of an external DAC is not a suitable cost-
effective solution for 8-bit microcontrollers. To reduce costs and to offer a good quality audio,
an ideal solution is to generate an audio signal using pulse width modulation (PWM).
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.
March 2010
Doc ID 17011 Rev 1
1/13
www.st.com