English
Language : 

VS1053B Datasheet, PDF (52/79 Pages) List of Unclassifed Manufacturers – Ogg Vorbis/MP3/AAC/WMA/MIDI AUDIO CODEC
VLSI
Solution y
VS1053b preliminary
VS1053B
9. OPERATION
9.6 Feeding PCM data
VS1053b can be used as a PCM decoder by sending a WAV file header. If the length sent in the WAV
header is 0 or 0xFFFFFFFF, VS1053b will stay in PCM mode indefinitely (or until SM CANCEL has
been set). 8-bit linear and 16-bit linear audio is supported in mono or stereo. A WAV header looks like
this:
File Offset Field Name
Size Bytes
Description
0 ChunkID
4 "RIFF"
4 ChunkSize
4 0xff 0xff 0xff 0xff
8 Format
4 "WAVE"
12 SubChunk1ID
4 "fmt "
16 SubChunk1Size
4 0x10 0x0 0x0 0x0 16
20 AudioFormat
2 0x1 0x0
Linear PCM
22 NumOfChannels 2 C0 C1
1 for mono, 2 for stereo
24 SampleRate
4 S0 S1 S2 S3
0x1f40 for 8 kHz
28 ByteRate
4 R0 R1 R2 R3
0x3e80 for 8 kHz 16-bit mono
32 BlockAlign
2 A0 A1
2 for mono, 4 for stereo 16-bit
34 BitsPerSample
2 B0 0xB1
16 for 16-bit data
52 SubChunk2ID
4 "data"
56 SubChunk2Size
4 0xff 0xff 0xff 0xff Data size
The rules to calculate the four variables are as follows:
• S = sample rate in Hz, e.g. 44100 for 44.1 kHz.
• For 8-bit data B = 8, and for 16-bit data B = 16.
• For mono data C = 1, for stereo data C = 2.
•
A=
C ×B
8
.
• R = S × A.
Example: A 44100 Hz 16-bit stereo PCM header would read as follows:
0000 52 49 46 46 ff ff ff ff 57 41 56 45 66 6d 74 20
0100 10 00 00 00 01 00 02 00 44 ac 00 00 10 b1 02 00
0200 04 00 10 00 64 61 74 61 ff ff ff ff
|RIFF....WAVEfmt |
|........D.......|
|....data....|
9.7 Ogg Vorbis Recording
Ogg Vorbis is an open file format that allows for very high sound quality with low to medium bitrates.
Ogg Vorbis recording is activated by loading the Ogg Vorbis Encoder Application to the 16 KiB program
RAM memory of the VS1053b. After activation, encoder results can be read from registers SCI HDAT0
and SCI HDAT1, much like when using ADPCM recording (Chapter 9.8).
Three profiles are provided: one for high-quality stereo recording at a bitrate of approx. 140 kbit/s, and
two for speech-quality mono recording at a bitrates between 15 and 30 kbit/s.
To use the Ogg Vorbis Encoder application, please load the application from VLSI Solution’s Web page
http://www.vlsi.fi/software/plugins/plugins.shtml and read the accompanying documentation.
Version 0.5, 2007-12-03
52