Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN3143 Datasheet(PDF) 6 Page - STMicroelectronics

Part # AN3143
Description  Audio software codec for the STM8S
PDF  13 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3143 Datasheet(HTML) 6 Page - STMicroelectronics

Back Button AN3143 Datasheet HTML 2Page - STMicroelectronics AN3143 Datasheet HTML 3Page - STMicroelectronics AN3143 Datasheet HTML 4Page - STMicroelectronics AN3143 Datasheet HTML 5Page - STMicroelectronics AN3143 Datasheet HTML 6Page - STMicroelectronics AN3143 Datasheet HTML 7Page - STMicroelectronics AN3143 Datasheet HTML 8Page - STMicroelectronics AN3143 Datasheet HTML 9Page - STMicroelectronics AN3143 Datasheet HTML 10Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 6 / 13 page
background image
Audio data encoding and storing
AN3143
6/13
Doc ID 17011 Rev 1
2
Audio data encoding and storing
The IMA ADPCM codec is quite popular on PC platforms and a wide range of audio
software with different capabilities to process and encode audio data is available. The
problematic part of encoded file storage is the file format of the ADPCM bitstream as it is not
standardized in [1]. On 8-bit microcontrollers, raw data without any formatting is preferred to
obtain the easiest manipulation with the coded audio file.
On the Microsoft Windows® platform, a WAVEform (WAV) audio data container is often
used to store linear PCM data. The WAV can also be used to store IMA ADPCM audio data.
To use the WAV for storing audio bitstream, a WAV parser has to be implemented in the
microcontroller decoding firmware. This is to unpack raw data so that they can be
decompressed. The WAV parser increases the complexity and size of the application and
does not bring many additional benefits to an 8-bit system.
Fortunately, software is available which can store coded audio bitstream directly as raw
data. An example includes the Sound eXchange (SOX) command-line application for audio
manipulation which is distributed under a GNU general purpose license.
SOX is able to:
●
Resample input audio data to any target frequency
●
Encode such data in IMA ADPCM format
●
Save output bitstream as unformatted raw data
The example command below shows the input parameters used to resample data to:
●
Target frequency 15625 Hz
●
Reduce volume by -12 dB
●
Compress data by using the IMA ADPCM codec
sox inputfilename -r 15625 outputfilename.ima gain -12
Various input file formats can be used, including PCM WAV, MP3, MP4, OGG, FLAC, and
many others. See the SOX documentation for further details.
2.1
Internal Flash memory used for audio data storing
The internal memory of STM8S can be used to store short audio waveforms. One 16-bit
PCM sample takes half a byte when compressed by IMA ADPCM codec. The memory
requirement can be evaluated using Equation 1.
Equation 1
For example, a 5-second ADPCM bitstream with an 8-kHz sample rate uses 20 Kbytes of
memory.
The audio data can be saved to the internal memory by using “in-application programming”
(IAP) or the bootloader. See the AN2659 (STM8S in-application programming (IAP) using a
customized bootloader) and UM0560 (STM8L/S bootloader) for more details.
Memory
samplerate
length
2
⁄
×
=



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com