VS1033a PRELIMINARY
VS1033
A
VS1033 - MP3/AAC/WMA/MIDI
AUDIO CODEC
Features
•
Decodes MPEG 1 & 2 audio layer III (CBR
+VBR +ABR); layers I & II optional;
MPEG4 / 2 AAC-LC-2.0.0.0 (+PNS);
WMA 4.0/4.1/7/8/9 all profiles (5-384 kbps);
WAV (PCM + IMA ADPCM);
General MIDI / SP-MIDI format 0 files
•
Encodes IMA ADPCM from microphone
or line input
•
Streaming support for MP3 and WAV
•
Bass and treble controls
•
Operates with a single clock 12..13 MHz.
•
Can also be used with 24..26 MHz clocks.
•
Internal PLL clock multiplier
•
Low-power operation
•
High-quality on-chip stereo DAC with no
phase error between channels
•
Stereo earphone driver capable of driving a
30Ω load
•
I2S interface for external DAC
•
Separate operating voltages for analog, dig-
ital and I/O
•
5.5 KiB On-chip RAM for user code / data
•
Serial control and data interfaces
•
Can be used as a slave co-processor
•
SPI flash boot for special applications
•
UART for debugging purposes
•
New functions may be added with software
and 8 GPIO pins
•
Lead-free RoHS-compliant package (Green)
I2S
Description
VS1033 is a single-chip MP3/AAC/WMA/MIDI
audio decoder and ADPCM encoder. It contains
a high-performance, proprietary low-power DSP
processor core VS DSP
4
, working data memory,
5 KiB instruction RAM and 0.5 KiB data RAM
for user applications, serial control and input data
interfaces, upto 8 general purpose I/O pins, an
UART, as well as a high-quality variable-sample-
rate mono ADC and stereo DAC, followed by an
earphone amplifier and a ground buffer.
VS1033 receives its input bitstream through a se-
rial input bus, which it listens to as a system slave.
The input stream is decoded and passed through a
digital volume control to an 18-bit oversampling,
multi-bit, sigma-delta DAC. The decoding is con-
trolled via a serial control bus. In addition to the
basic decoding, it is possible to add application
specific features, like DSP effects, to the user RAM
memory.
mic
audio
line
audio
GPIO
VS1033
MIC AMP
8
GPIO
MUX
audio
Mono
ADC
Stereo
DAC
Stereo Ear−
phone Driver
L
R
output
X ROM
DREQ
SO
SI
SCLK
XCS
XDCS
Serial
Data/
Control
Interface
X RAM
VSDSP
4
Y ROM
RX
TX
UART
Y RAM
Clock
multiplier
Instruction
RAM
Instruction
ROM
Version 0.6,
2005-01-05
1
VLSI
Solution
y
VS1033a PRELIMINARY
VS1033
A
CONTENTS
Contents
1 Licenses
9
2
Disclaimer
9
3
Definitions
9
4
Characteristics & Specifications
4.1
4.2
4.3
4.4
4.5
4.6
Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Recommended Operating Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Digital Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Switching Characteristics - Boot Initialization . . . . . . . . . . . . . . . . . . . . . . .
10
10
10
11
11
12
12
5
Packages and Pin Descriptions
5.1
Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.1
5.1.2
5.2
LQFP-48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BGA-49 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
13
13
13
14
LQFP-48 and BGA-49 Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Connection Diagram, LQFP-48
16
7
SPI Buses
7.1
7.2
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SPI Bus Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2.1
VS1002 Native Modes (New Mode) . . . . . . . . . . . . . . . . . . . . . . . .
17
17
17
17
Version 0.6,
2005-01-05
2
VLSI
Solution
y
VS1033a PRELIMINARY
7.2.2
VS1033
A
CONTENTS
VS1001 Compatibility Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
18
18
18
18
19
19
19
19
20
20
21
22
22
22
23
7.3
7.4
Data Request Pin DREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . . . . . . . .
Passive SDI Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.5
Serial Protocol for Serial Command Interface (SCI) . . . . . . . . . . . . . . . . . . . .
7.5.1
7.5.2
7.5.3
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI 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
Supported MP3 (MPEG layer III) Formats . . . . . . . . . . . . . . . . . . . .
Supported MP1 (MPEG layer I) Formats . . . . . . . . . . . . . . . . . . . . .
Supported MP2 (MPEG layer II) Formats . . . . . . . . . . . . . . . . . . . . .
Supported AAC (ISO/IEC 13818-7) Formats . . . . . . . . . . . . . . . . . . .
Supported WMA Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
24
24
24
25
25
26
27
Version 0.6,
2005-01-05
3
VLSI
Solution
y
VS1033a PRELIMINARY
8.2.6
8.2.7
VS1033
A
CONTENTS
Supported RIFF WAV Formats . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported MIDI Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
29
30
30
31
31
32
34
34
35
36
36
36
36
37
38
38
39
8.3
8.4
8.5
8.6
Data Flow of VS1033 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Data Interface (SDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Control Interface (SCI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.6.1
8.6.2
8.6.3
8.6.4
8.6.5
8.6.6
8.6.7
8.6.8
8.6.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.6.10 SCI AIADDR (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.6.11 SCI VOL (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.6.12 SCI AICTRL[x] (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
Operation
9.1
9.2
9.3
9.4
Clocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ADPCM Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.4.1
Activating ADPCM mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
40
40
40
41
41
Version 0.6,
2005-01-05
4
VLSI
Solution
y
VS1033a PRELIMINARY
9.4.2
9.4.3
9.4.4
9.4.5
9.4.6
VS1033
A
CONTENTS
Reading IMA ADPCM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a RIFF Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Playing ADPCM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Rate Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
42
43
43
43
45
45
45
46
47
47
48
48
49
49
49
49
50
50
51
51
51
52
52
9.5
9.6
9.7
9.8
SPI Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Play/Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Feeding PCM data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extra Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.8.1
9.8.2
9.8.3
9.8.4
Common Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Midi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.9
Fast Forward / Rewind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.9.1
9.9.2
9.9.3
9.9.4
9.9.5
MP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AAC - ADTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AAC - ADIF, MP4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Midi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.10 SDI Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.10.1 Sine Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.10.2 Pin Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.10.3 Memory Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.10.4 SCI Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Version 0.6,
2005-01-05
5