– Stand-alone MP3 Decoder
– 48, 44.1, 32, 24, 22.05, 16 kHz Sampling Frequency
– Separated Digital Volume Control on Left and Right Channels (Software Control
Using 31 Steps)
– Bass, Medium, and Treble Control (31 Steps)
– Bass Boost Sound Effect
– Ancillary Data Extraction
– “CRC Error” and “MPEG Frame Synchronization” Indicators
• Programmable Audio Output for Interfacing With Common Audio DAC
– PCM Format Compatible
2
–I
S Format Compatible
• 8-bit MCU C51 Core Based (F
• 2304 Bytes of Internal RAM
• 64K Bytes of Code Memory
– Flash: AT89C51SND1C, ROM: AT83C51SND1C
• 4K Bytes of Boot Flash Memory (AT89C51SND1C)
– ISP: Download from USB or UART to Any External Memor y Cards
• USB Rev 1.1 Controller
– “Full Speed” Data Transmission
• Built-in PLL
– MP3 Audio Clocks
–USBClock
• MultiMedia Card™ Interface Compatibility
• Atmel DataFlash
• IDE/ATAPI Interface
•2 Channels 10-bit ADC, 8 kHz (8-True Bit)
– Battery Voltage Monitoring
– Voice Recording Controlled by Software
• Up to 44 bits of General-purpose I/Os:
– 4-bit Interrupt Keyboard Port for a 4 x n Mat rix
– SmartMedia™ Software Interface
• Standard Two 16-bit Timers/Counters
• Hardware Watchdog Timer
• Standard Full Duplex UART with Baud Rate Generator
• Two Wire Interface (TWI) Master and Slave Modes Controller
–3V,±10%, 25 mA Typical Operating at 25°C
– Temperature Range: -40°Cto+85°C
• Packages
– TQFP80, PLCC84 (Development Board)
–Dice
®
SPI Interface Compatibility
=20MHz)
MAX
Single-Chip
Microcontroller
with M P3
Decoder and
Man-Machine
Interface
AT83C51SND1C
AT89C51SND1C
Preliminary
Summary
Description
The AT8 xC 5 1SND1C are full y integrated stand-alone hardwired MPEG I/II-L ay e r 3
decoders with a C51 microcontroller co re han dling data flow and MP3-player control.
The AT89C51SND1C includes 64K B y tes of Flash memory and al lows In-System Programming through an embedded 4K By tes of Boot Flash Memory.
Rev. 4106F–8051–10/02
The AT83C51SND1C includes 64K Byte s of ROM memory.
The AT8xC51SND1C includes 2304 Byt es of RAM memory.
The AT8xC51SND1C provides all necessary features for man m achine interface like
timers, keyboard port, serial or parallel interf ace (USB, TWI, SPI, IDE), ADC input, I
output, and all external memory interface (NA ND or NOR Flash, SmartMedia, MultiMedia, DataFlash cards).
writtento them float andcan be usedas high impedanceinputs. To
avoid any parasitic current consumption, floating P0 inputs must be
polarized to
Port 1
P1 is an 8-bit bi-directionalI/O portwith internal pull-ups.
V
or VSS.
DD
Alternate
Function
AD7:0
KIN3:0
SCL
SDA
4
AT8xC51SND1C
4106F–8051–10/02
Table 1. P ort s Signal Des cription (Continue d)
Signal
NameTypeDescription
AT8xC51SND1C
Alternate
Function
P2.7:0I/O
P3.7:0I/O
P4.7:0I/O
P5.3:0I/O
Port 2
P2 is an 8-bit bi-directionalI/O portwith internal pull-ups.
Port 3
P3 is an 8-bit bi-directionalI/O portwith internal pull-ups.
Port 4
P4 is an 8-bit bi-directionalI/O portwith internal pull-ups.
Port 5
P5 is a 4-bit bi-directionalI/O port with internal pull-ups.
Table 2. Clock Signal Description
Signal
NameTypeDescription
Input to the on-chip inverting oscillator amplifier
X1I
To usethe internal oscillator, a crystal/resonator circuit is connected to
this pin. If an external oscillator is used, its output is connected to this
pin. X1is the clocksource for internal timing.
A15:8
RXD
TXD
INT0
INT1
T0
T1
WR
RD
MISO
MOSI
SCK
SS
-
Alternate
Function
-
X2O
FILTI
Output of the on-chip inverting oscillator amplifier
To usethe internal oscillator, a crystal/resonator circuit is connected to
this pin. If an external oscillator is used, leave X2 unconnected.
PLL low pass filter input
FILT receives the RC network ofthe PLL lowpass filter.
Table 3. Timer 0 and Timer 1 Signal Description
Signal
NameTypeDescription
Timer 0 Gate Input
INT0
serves asexternal run control for timer0,when selected by
GATE0 bitin TCON register.
INT0
INT1
I
External Interrupt 0
INT0
input sets IE0 in the TCON register. If bit IT0 in this register is set,
bitIE0issetbyafallingedgeonINT0
by a low level on INT0
Timer 1 Gate Input
INT1
serves asexternal run control for timer1,when selected by
GATE1 bitin TCON register.
I
External Interrupt 1
INT1
input sets IE1 in the TCON register. If bit IT1 in this register is set,
bitIE1issetbyafallingedgeonINT1
by a low level on INT1
.
.
-
-
Alternate
Function
P3.2
.IfbitIT0iscleared,bitIE0isset
P3.3
.IfbitIT1iscleared,bitIE1isset
4106F–8051–10/02
5
Table 3. Timer 0 and Timer 1 Signal Description (Continued)
Signal
NameTypeDescription
Alternate
Function
T0I
T1I
Timer 0 External Clock Input
When Timer 0 operates as a counter, a falling edge on the T0 pin
increments the count.
Timer 1 External Clock Input
When Timer 1 operates as a counter, a falling edge on the T1 pin
increments the count.
Table 4. A udio Interface Signal Description
Signal
NameTypeDescription
DCLKODAC Data Bit Clock-
DOUTODACAudio Data-
DSELO
SCLKO
DAC Channel Select Signal
DSEL is the sample rate clock output.
DAC System Clock
SCLK is the oversampling clock synchronized to the digital audio data
(DOUT) and the channel selection signal (DSEL).
Table 5. USB Controller Signal Description
Signal
NameTypeDescription
P3.4
P3.5
Alternate
Function
-
-
Alternate
Function
USB Positive Data Upstream Port
V
D+I/O
D-I/OUSB Negative Data Upstream Port-
This pin requires an external 1.5 kΩ pull-up to
operation.
for full speed
DD
Table 6. MutiMediaCard Interface Signal Description
Signal
NameTypeDescription
MCLKO
MCMDI/O
MDATI/O
MMC Clock output
Data orcommandclock transfer.
MMC Command line
bi-directional command channel used for card initialization and data
transfer commands. To avoid any parasiticcurrentconsumption,
unusedMCMD input must be polarized to
MMC Data line
bi-directional data channel. To avoid any parasitic current consumption,
unused MDAT input must be polarized to
V
or VSS.
DD
V
or VSS.
DD
-
Alternate
Function
-
-
-
6
AT8xC51SND1C
4106F–8051–10/02
Table 7. UART S ignal Desc ription
Signal
NameTypeDescription
Receive SerialData
RXDI/O
TXDO
RXD sends and receives data in serial I/O mode 0 and receives data in
serial I/O modes 1, 2 and 3.
TransmitSerialData
TXD outputs theshift clock in serial I/Omode 0 and transmits datain
serial I/O modes 1, 2 and 3.
Table 8. S P I Controller Sign al Description
Signal
NameTypeDescription
SPI Master Input Slave Output Data Line
MISOI/O
MOSII/O
When in master mode, MISO receives data from the slave peripheral.
When inslave mode,MISO outputs datato the master controller.
SPI Master OutputSlave Input Data Line
When in master mode, MOSI outputs data to the slave peripheral.
When in slave mode, MOSI receives data from the master controller.
AT8xC51SND1C
Alternate
Function
P3.0
P3.1
Alternate
Function
P4.0
P4.1
SCKI/O
SS
SPI Clock Line
Whenin mastermode, SCKoutputsclockto theslaveperipheral.When
in slave mode, SCK receives clock from the master controller.
SPI Slave Select Line
I
When in controlled slave mode, SS
enables the slave mode.
Table 9. TWI Controller Signal Description
Signal
NameTypeDescription
TWISerialClock
SCLI/O
SDAI/O
When TWIcontrollerisin master mode, SCL outputsthe serial clock to
the slaveperipherals. When TWIcontroller isin slavemode, SCL
receives clockfrom the master controller.
TWISerialData
SDA is the bi-directional TWI data line.
Table 10. A/D Converter Signal Description
Signal
NameTypeDescription
AIN1:0IA/D Converter Analog Inputs-
AREFPIAnalog Positive Voltage ReferenceInput-
P4.2
P4.3
Alternate
Function
P1.6
P1.7
Alternate
Function
4106F–8051–10/02
AREFNI
Analog Negative Voltage Reference Input
This pinis internallyconnected to AV SS.
-
7
Table 11. Keypad Interface Signal Description
Signal
NameTypeDescription
Alternate
Function
KIN3:0I
Keypad InputLines
Holding oneofthese pinshigh orlow for 24 oscillator periods triggers a
keypad interrupt.
Table 12. External Access Signal Description
Signal
NameTypeDescription
A15:8I/O
AD7:0I/O
ALEO
ISP
RD
WR
Address Lines
Upper address lines for the external bus.
Multiplexedhigher addressand datalinesfor the IDEinterface.
Address/Data Lines
Multiplexedlower addressand datalines forthe external memoryor the
IDE interface.
AddressLatch Enable Output
ALE signals the start of an external bus cycle and indicates that valid
address information is available on lines A7:0. An external latch is used
to demultiplex the address from address/data bus.
ISP Enable Input
I/O
This signal mustbe heldtoGND through a pull-down resistoratthe
falling reset to force execution of the internal bootloader.
Read Signal
O
Read signal asserted during external data memory read operation.
Write Signal
O
Write signal asserted during external data memory write operation.
P1.3:0
Alternate
Function
P2.7:0
P0.7:0
-
-
P3.7
P3.6
Table 13. System Signal Description
Signal
NameTypeDescription
Reset Input
Holding thispin highfor 64 oscillator periods while the oscillator is
running resetsthe device. The Port pins are drivento theirreset
conditions when a voltage lowerthan V
RSTI
TSTI
oscillator is running.
Thispin has aninternalpull-downresistor which allows the device tobe
resetbyconnecting a capacitor between thispin and
AssertingRSTwhenthechipisinIdlemodeorPower-downmode
returns the chip to normal operation.
Test Input
T est mode entry signal. This pin must be set to
is applied,whetheror not the
IL
V
.
DD
V
.
DD
Alternate
Function
-
-
8
AT8xC51SND1C
4106F–8051–10/02
Table 14. Power S ignal Des cri ption
Signal
NameTypeDescription
AT8xC51SND1C
Alternate
Function
V
DD
VSSGND
A
V
AVSSGND
P
V
PVSSGND
U
V
UVSSGND
DD
DD
DD
PWR
PWR
PWR
PWR
Digital SupplyVoltage
Connectt hese pins to+3Vsupplyvoltage.
Circuit Ground
Connectthese pins to ground.
Analog Supply Voltage
Connectthis pin to +3V supply voltage.
Analog Ground
Connectthis pin to ground.
PLL Supply voltage
Connectthis pin to +3V supply voltage.
PLL Circuit Ground
Connectthis pin to ground.
USB Supply Voltage
Connectthis pin to +3V supply voltage.
USB Ground
Connectthis pin to ground.
-
-
-
-
-
-
-
-
4106F–8051–10/02
9
Internal P in Structure
Table 15. Detailed Internal Pin Structure
Circuit
V
DD
(1)
TypePins
Watchdog Output
Latch Output
2osc
periods
TST
R
V
DD
P
VSS
VDDV
P
1
N
VSS
V
P
N
Input
Input/OutputRST
RST
R
V
DD
DD
P
P
DD
3
2
Input/Output
Input/Output
TST
(2)
P1
(3)
P2
P3
P4
P53:0
P0
MCMD
MDAT
ISP
VSS
V
P
N
VSS
DD
D+
D-
Output
Input/Output
ALE
SCLK
DCLK
DOUT
DSEL
MCLK
D+
D-
Notes: 1. For information on resistors value, input/output levels, and drive capability, refer t o the Section “DC Characteristics”,
page 24.
2. When the TWI controller is enabled, P
3. In Port 2, P
transistor is continuously driven when outputting a high level bit address (A15:8).
Figure 7. AT8xC51S ND1C Typical Application with IDE CD-RO M Drive
LCD
Battery
Ref.
P4.2
P4.4
P4.5
P4.6
P4.0
P1.0/KIN0
P1.1/KIN1
P1.2/KIN2
P0.0
P0.1
P0.2
P0.3
X1
X2
FILT
P4.1
P4.7
P1.6/SCL
P1.7/SDA
AIN1
AIN0
VREFP
AT8xC51SND1C
P3.4
P3.5
Audio DAC
V
VREFN
DD
VSS
AVSS
DD
RST
AV
MCLK
MDAT
MCMD
UV
DD
D+
D-
UVSS
USB PORT
MMC1
MMC2
4106F–8051–10/02
PVSS
P2
P0
IDE CD-ROM
P3.6/WR
P3.7/RD
DOUT
DCLK
DSEL
SCLK
P3.4
P3.5
VSS
AVSS
Audio DAC
13
Address Sp acesThe AT8xC51SND1C derivatives implement four different address spaces:
•Program/Code Memory
•Boot Memory
•Data Memory
•Special Function Registers (SFRs)
Code MemoryThe AT89C51SND1C and AT83C51SND1C implement 64K Bytes of on-chip pro-
gram/code memory. The AT83C51SND1 C product provides the internal p rogram/code
memory in ROM technology while the AT89C51SND1C product provides i t in Flash
technology.
The Flash memory increases ROM functionality by enabling in-circuit ele ctrical erasure
and programming. Thanks to the internal charge pump, the high voltage needed for programming or erasing Flash cells is generated on-chip using the standard V
Thus, the AT89C51SND1C can be programmed using only one voltage and allows in
application software programming commonly known as IAP. Hardware programming
mode is also available using specific programm ing tools.
Boot MemoryThe AT89C51SND1C implements 4K Bytes of on-chip boot me mory prov ided in Flash
technology. This bo ot memory is delivered p ro grammed with a standard bootloader software allowing In-system Programming comm only known as ISP. It also contains some
Application Programming Int erf aces routines commonly known as API allowing user to
develop his own bootloader.
voltage.
DD
Data MemoryThe AT8xC51SND1 derivatives implement 2304 B ytes of on-chip data R AM. T his mem-
ory is divided in two s eparate areas:
•256 Bytes of on-chip RAM memory (standard C51 memory).
•2048 Bytes of on-chip expanded RAM memory (E RAM accessible via MOVX
instructions).
14
AT8xC51SND1C
4106F–8051–10/02
AT8xC51SND1C
Special Function
Registers
The Special Function Registers (SFRs) of the AT8xC51SND1 derivatives fall into the
categories detailed in Table 16 through Table 32. The relative addres ses of these S FRs
are provided together with their reset values in Table 33. In this table, the bit-addressable registers are identified by Note 1.
Table 16. C51CoreSFRs
MnemonicAddName765 43210
ACCE0h Accumulator––––––––
BF0hBRegister––––––––
PSWD0h
SP81h Stack Pointer––––––––
DPL82h
DPH83h
ProgramStatus
Word
Data PointerLow
byte
Data PointerHigh
byte
CYACF0RS1RS0OVF1P
––––––––
––––––––
Table 17. System Managem ent SFRs
MnemonicAddName765 43210
PCON87h Power ControlSMOD1SMOD0––GF1GF0PDIDL
AUXR8Eh Auxiliary Register 0–EXT16M0DPHDISXRS1XRS0EXTRAMAO
AUXR1A2h Auxiliary Register 1––ENBOOT–GF30–DPS
NVERSFBh Version NumberNV7NV6NV5NV4NV3NV2NV1NV0