VS1053b preliminary
VS1053
B
VS1053b -
Ogg Vorbis/MP3/AAC/WMA/MIDI
AUDIO CODEC
Features
Description
•
Decodes
Ogg Vorbis;
VS1053b is a single-chip Ogg Vorbis/MP3/AAC/-
MPEG 1 & 2 audio layer III (CBR +VBR
WMA/MIDI audio decoder and an IMA ADPCM
+ABR); layers I & II optional;
and user-loadable Ogg Vorbis encoder. It contains
MPEG4 / 2 AAC-LC(+PNS),
a high-performance, proprietary low-power DSP
HE-AAC v2 (Level 3)
(SBR + PS);
processor core VS DSP
4
, working data memory,
WMA 4.0/4.1/7/8/9 all profiles (5-384 kbps);
16 KiB instruction RAM and 0.5+ KiB data RAM
WAV (PCM + IMA ADPCM);
for user applications running simultaneously with
General MIDI 1 / SP-MIDI format 0 files
any built-in decoder, serial control and input data
•
Encodes Ogg Vorbis with software plu-
interfaces, upto 8 general purpose I/O pins, an
gin
(available Q4/2007)
UART, as well as a high-quality variable-sample-
rate stereo ADC (mic, line, line + mic or 2×line)
•
Encodes
IMA ADPCM
from mic/line (stereo)
and stereo DAC, followed by an earphone ampli-
•
Streaming support for MP3 and WAV
fier and a common voltage buffer.
•
EarSpeaker Spatial Processing
•
Bass and treble controls
VS1053b receives its input bitstream through a
•
Operates with a single 12..13 MHz clock
serial input bus, which it listens to as a system
•
Can also be used with a 24..26 MHz clock
slave. The input stream is decoded and passed
through a digital volume control to an 18-bit over-
•
Internal PLL clock multiplier
sampling, multi-bit, sigma-delta DAC. The decod-
•
Low-power operation
ing is controlled via a serial control bus. In addi-
•
High-quality on-chip stereo DAC with no
tion to the basic decoding, it is possible to add
phase error between channels
application specific features, like DSP effects, to
•
Zero-cross detection for smooth volume
the user RAM memory.
change
•
Stereo earphone driver capable of driving a
Optional factory-programmable unique chip ID pro-
30
Ω
load
vides basis for digital rights management or unit
•
Quiet power-on and power-off
identification features.
•
I2S interface for external DAC
I2S
•
Separate voltages for analog, digital, I/O
audio
VS1053
L
Stereo Ear−
Stereo
Stereo
•
On-chip RAM for user code and data
differential1
MUX
MIC AMP
mic / line
phone Driver
ADC
DAC
R
line 2
output
•
Serial control and data interfaces
8
GPIO
GPIO
•
Can be used as a slave co-processor
X ROM
DREQ
•
SPI flash boot for special applications
SO
Serial
SI
X RAM
Data/
•
UART for debugging purposes
4
SCLK
Control
VSDSP
Interface
•
New functions may be added with software
XCS
XDCS
Y ROM
and upto 8 GPIO pins
RX
•
Lead-free RoHS-compliant package (Green)
TX
UART
Y RAM
Clock
multiplier
Instruction
RAM
Instruction
ROM
Version 0.5,
2007-12-03
1
VLSI
Solution
y
VS1053b preliminary
VS1053
B
CONTENTS
Contents
1 Licenses
2
3
4
Disclaimer
Definitions
Characteristics & Specifications
4.1
4.2
4.3
4.4
4.5
4.6
5
Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Recommended Operating Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Digital Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Switching Characteristics - Boot Initialization . . . . . . . . . . . . . . . . . . . . . . .
9
9
9
10
10
10
11
11
12
12
13
13
13
16
18
18
18
18
18
19
Packages and Pin Descriptions
5.1
Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.1
LQFP-48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
7
Connection Diagram, LQFP-48
SPI Buses
7.1
7.2
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SPI Bus Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2.1
7.2.2
7.3
VS1002 Native Modes (New Mode) . . . . . . . . . . . . . . . . . . . . . . . .
VS1001 Compatibility Mode (deprecated) . . . . . . . . . . . . . . . . . . . . .
Data Request Pin DREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Version 0.5,
2007-12-03
2
VLSI
Solution
y
VS1053b preliminary
VS1053
B
CONTENTS
7.4
Serial Protocol for Serial Data Interface (SDI) . . . . . . . . . . . . . . . . . . . . . . .
7.4.1
7.4.2
7.4.3
7.4.4
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SDI in VS1002 Native Modes (New Mode) . . . . . . . . . . . . . . . . . . . .
SDI in VS1001 Compatibility Mode (deprecated) . . . . . . . . . . . . . . . . .
Passive SDI Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
19
19
20
20
20
20
21
21
22
23
24
24
24
25
26
26
26
26
27
27
27
28
30
7.5
Serial Protocol for Serial Command Interface (SCI) . . . . . . . . . . . . . . . . . . . .
7.5.1
7.5.2
7.5.3
7.5.4
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Multiple Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.6
7.7
SPI Timing Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SPI Examples with SM SDINEW and SM SDISHARED set . . . . . . . . . . . . . . .
7.7.1
7.7.2
7.7.3
Two SCI Writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two SDI Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Operation in Middle of Two SDI Bytes . . . . . . . . . . . . . . . . . . . .
8
Functional Description
8.1
8.2
Main Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported Audio Codecs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.2.1
8.2.2
8.2.3
8.2.4
8.2.5
8.2.6
Supported MP3 (MPEG layer III) Formats . . . . . . . . . . . . . . . . . . . .
Supported MP1 (MPEG layer I) Formats . . . . . . . . . . . . . . . . . . . . .
Supported MP2 (MPEG layer II) Formats . . . . . . . . . . . . . . . . . . . . .
Supported Ogg Vorbis Formats . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported AAC (ISO/IEC 13818-7 and ISO/IEC 14496-3) Formats . . . . . . .
Supported WMA Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Version 0.5,
2007-12-03
3
VLSI
Solution
y
VS1053b preliminary
8.2.7
8.2.8
VS1053
B
CONTENTS
Supported RIFF WAV Formats . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported MIDI Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
32
34
35
36
36
37
38
40
41
42
43
43
43
43
45
46
47
47
48
48
48
48
49
8.3
8.4
8.5
8.6
8.7
Data Flow of VS1053b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EarSpeaker Spatial Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Data Interface (SDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Control Interface (SCI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.7.1
8.7.2
8.7.3
8.7.4
8.7.5
8.7.6
8.7.7
8.7.8
8.7.9
SCI MODE (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI STATUS (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI BASS (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI CLOCKF (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI DECODE TIME (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI AUDATA (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI WRAM (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI WRAMADDR (W) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI HDAT0 and SCI HDAT1 (R) . . . . . . . . . . . . . . . . . . . . . . . . .
8.7.10 SCI AIADDR (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.7.11 SCI VOL (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.7.12 SCI AICTRL[x] (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
Operation
9.1
9.2
9.3
9.4
Clocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Low Power Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Version 0.5,
2007-12-03
4
VLSI
Solution
y
VS1053b preliminary
VS1053
B
CONTENTS
9.5
Play and Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.5.1
9.5.2
9.5.3
9.5.4
9.5.5
Playing a Whole File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cancelling Playback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fast Play . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fast Forward and Rewind without Audio . . . . . . . . . . . . . . . . . . . . .
Maintaining Correct Decode Time . . . . . . . . . . . . . . . . . . . . . . . . .
49
49
50
50
50
51
52
52
53
53
54
54
55
55
56
56
57
58
59
60
61
61
62
62
9.6
9.7
9.8
Feeding PCM data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ogg Vorbis Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ADPCM Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.8.1
9.8.2
9.8.3
9.8.4
9.8.5
Activating ADPCM mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reading IMA ADPCM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a RIFF Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Playing ADPCM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Rate Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.9
SPI Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.10 Real-Time MIDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.11 Extra Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.11.1 Common Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.11.2 WMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.11.3 AAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.11.4 Midi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.11.5 Ogg Vorbis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.12 SDI Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.12.1 Sine Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Version 0.5,
2007-12-03
5