– 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
P080h 8-bit Port 0––––––––
P190h 8-bit Port 1––––––––
P2A0h 8-bit Port 2––––––––
P3B0h 8-bit Port 3––––––––
P4C0h 8-bit Port 4––––––––
P5D8h 4-bit Port 5––––––––
AUDCON09Ah Audio Control 0JUST4JUST3JUST2JUST1JUST0POLDSIZHLR
AUDCON19Bh Audio Control 1SRCDRQENMSREQMUDRN–DUP1DUP0AUDEN
AUDSTA9Ch Audio StatusSREQUDRNAUBUSY–––––
AUDDAT9Dh Audio DataAUD7AUD6AUD5AUD4AUD3AUD2AUD1AUD0
AUDCLKECh Audio Clock Divider–––AUCD4AUCD3AUCD2AUCD1AUCD0
4106F–8051–10/02
17
Table 25. USB Controller SFRs
MnemonicAddName765 43210
USBCONBCh USB Global ControlUSBESUSPCLKSDRMWUP–UPRSMRMWUPECONFGFADDEN
USBADDRC6h USB AddressFENUADD6UADD5UADD4UADD3UADD2UADD1UADD0
USBINTBDh USB Global Interrupt––WUPCPUEORINTSOFINT––SPINT
USBIENBEh
UEPNUMC7h
UEPCONXD4h
UEPSTAXCEh
UEPRSTD5h USB Endpoint Reset––––EP3RSTEP2RSTEP1RSTEP0RST
UEPINTF8h
UEPIENC2h
UEPDATXCFh
UBYCTXE2h
UFNUMLBAh
UFNUMHBBh
USB Global Interrupt
Enable
USB Endpoint
Number
USB Endpoint X
Control
USB Endpoint X
Status
USB Endpoint
Interrupt
USB Endpoint
Interrupt Enable
USB Endpoint X
FIFO Data
USB Endpoint X Byte
Counter
USB Frame Number
Low
USB Frame Number
High
––EWUPCPUEEORINTESOFINT––E SPINT
––––––EPNUM1EPNUM0
EPEN–––DTGLEPDIREPTYPE1EPTYPE0
DIR–STALLRQTXRDYSTLCRCRXSETUPRXOUTTXCMP
––––EP3INTEP2INTEP1INTEP0INT
––––EP3INTEEP2INTEEP1INTEEP0INTE
FDAT7FDAT6FDAT5FDAT4FDAT3FDAT2FDAT1FDAT0
-BYCT6BYCT5BYCT4BYCT3BYCT2BYCT1BYCT0
FNUM7FNUM6FNUM5FNUM4FNUM3FNUM2FNUM1FNUM0
––CRCOKCRCERR–FNUM10FNUM9FNUM8
USBCLKEAh USB Clock Divider––––––USBCD1USBCD0
Table 26. MMC Controller SFRs
MnemonicAddName76 543210
MMCON0E4h MMCControl 0DRPTRDTPTRCRPTRCTPTRMBLOCKDFMTRFMTCRCDI S
MMCON1E5h MMC Control 1BLEN3BLEN2BLEN1BLEN0DATDIRDATENRESPENCMDEN
MMCON2E6h MMC Co ntrol 2MMCENDCRCCR––DATD1DATD0FLOWC
KBCONA3h Keyboard Co nt rolKINL3KINL2KINL1KINL0KINM3KINM2KINM1KINM0
KBSTAA4h Keyboard StatusKPDE–––KINF3KINF2KINF1KINF0
4106F–8051–10/02
19
Table 32. A/D Controller SFRs
MnemonicAddName765 43210
ADCONF3h ADC Control–ADIDLADENADEOCADSST––ADCS
ADCLKF2h ADC Clock Divider–––ADCD4ADCD3ADCD2ADCD1ADCD0
ADDLF4h ADC Data Low Byte––––––ADAT1ADAT0
ADDHF5h ADC Data High ByteA DAT9ADAT8ADAT7ADAT6ADAT5ADAT4ADAT3ADAT2
20
AT8xC51SND1C
4106F–8051–10/02
Table 33. SFR Addresses and Reset Values
0/81/92/A3/B4/C5/D6/E7/F
F8h
F0h
UEPINT
0000 0000
1
B
0000 0000
DAT16H
XXXX XXXX
ADCLK
0000 0000
NVERS
1000 0100
ADCON
0000 0000
2
ADDL
0000 0000
ADDH
0000 0000
AT8xC51SND1C
FFh
F7h
E8h
E0h
D8h
D0h
C8h
C0h
B8h
B0h
A8h
A0h
98h
90h
88h
80h
1
ACC
0000 0000
1
P5
XXXX 1111
1
PSW
0000 0000
MP3STA
0000 0001
1
P4
1111 1111
1
IPL0
X000 0000
1
P3
1111 1111
1
IEN0
0000 0000
1
P2
1111 1111
SCON
0000 0000
1
P1
1111 1111
1
TCON
0000 0000
1
P0
1111 1111
1
XXXX XXXX
PLLCON
0000 1000
3
FCON
1111 0000
SADEN
0000 0000
IEN1
0000 0000
SADDR
0000 0000
SBUF
BRL
0000 0000
TMOD
0000 0000
SP
0000 0111
4
USBCLK
0000 0000
UBYCTLX
0000 0000
UEPIEN
0000 0000
UFNUML
0000 0000
IPL1
0000 0000
MP3CON
0011 1111
AUXR1
XXXX 00X0
AUDCON0
0000 1000
BDRCON
XXX0 0000
TL0
0000 0000
DPL
0000 0000
MP3CLK
0000 0000
SPCON
0001 0100
UFNUMH
0000 0000
IPH1
0000 0000
KBCON
0000 1111
AUDCON1
10110010
SSCON
0000 0000
TL1
0000 0000
DPH
0000 0000
AUDCLK
0000 0000
MMCON0
0000 0000
MMDAT
1111 1111
UEPCONX
0000 0000
SPSTA
0000 0000
USBCON
0000 0000
MP3BAS
0000 0000
MP3DAT
0000 0000
KBSTA
0000 0000
AUDSTA
1100 0000
SSSTA
1111 1000
TH0
0000 0000
MMCLK
0000 0000
MMCON1
0000 0000
MMCMD
1111 1111
UEPRST
0000 0000
SPDAT
XXXX XXXX
USBINT
0000 0000
MP3MED
0000 0000
MP3ANC
0000 0000
AUDDAT
1111 1111
SSDAT
1111 1111
TH1
0000 0000
PLLNDIV
0000 0000
MMCON2
0000 0000
MMSTA
0000 0000
UEPSTAX
0000 0000
USBADDR
1000 0000
USBIEN
0001 0000
MP3TRE
0000 0000
WDTRST
XXXX XXXX
MP3VOL
0000 0000
SSADR
1111 1110
AUXR
X000 1101
PLLRDIV
0000 0000
MMINT
0000 0011
MMMSK
1111 1111
UEPDATX
0000 0000
UEPNUM
0000 0000
IPH0
X000 0000
MP3STA1
0100 0001
WDTPRG
XXXX X000
MP3VOR
0000 0000
CKCON
0000 000X
PCON
XXXX 0000
EFh
E7h
DFh
D7h
CFh
C7h
BFh
B7h
AFh
A7h
9Fh
97h
8Fh
5
87h
0/81/92/A3/B4/C5/D6/E7/F
Reserved
Notes: 1. SFR registers with least significant nibble address equal to 0 or 8 are bit-addressable.
2. NVERS reset value depends on the silicon version.
3. FCON register is only available in AT89C51SND1Cproduct.
4. FCON reset value is 00h in case of reset with hardware condition.
5. CKCON reset value depends on the X2B bit (programmed or unprogrammed) in the Hardware Byte.
4106F–8051–10/02
21
Peripherals
Clock Generator SystemThe AT8xC51SND1C internal clocks are extracted from an on-chip PLL fed by an on-
chip oscillator. Four clocks are generated respectively for the C51 core, the MP3
decoder, the au dio interface, and t he other peripherals. The C51 and peripheral clocks
are derived from the oscillator clock. The MP3 decoder clock is generated by dividing
the PLL output clock. The audio interface sample rates are also obtained by dividing the
PLL output clock.
PortsThe AT8xC51SND1C implement five 8-bit ports (P0 - P4) and one 4-bit port (P5). In
addition to performing general-purpose I/Os, some ports are capable of external data
memory operations; o thers allow for alterna te functions. All I /O Ports are bi-d irect ional.
Each Port cont ains a latch, an output driver a nd an input buffer. Port 0 and Port 2 output
drivers and input buffers facilitate external memory operations. Some Port 1, Port 3 a nd
Port 4 pins serve for both general-purpose I/Os and alternate functions.
Timers/CountersThe AT8xC51SND1C implement the two general-purpose, 16-bit Timers/Counters of a
standard C51. They are identified as Timer 0, Timer 1, and can independently be configured each to operate in a variety of modes as a Timer or as an event Counter. When
operating as a Timer, a Timer/Counter runs for a program med length of time, then
issues an interrupt request. When ope rating as a Counter, a Timer/Counter counts negative transitions on an external pin. After a preset number of count s , the Counter issues
an interrupt request.
Watchdog TimerThe AT8xC51SND1C implement a hardw are Watchdog Timer that automatically reset s
the chip if it is allowed to t im e out. The WDT provides a means of recovering from routines that do not complete successfully due to software or hardware malfunctions.
MP3 DecoderThe AT8xC51SND1C implements a MP EG I/ II audio layer 3 decoder (MP 3 deco der).
In MPEG I (ISO 11172-3 ) three layers o f compression have been standardized suppo rting three sampling frequencies: 48, 44.1, and 32 kHz. Among these layers, layer 3
allows highest compression rate of about 12:1 while still m aintaining CD audio quality.
For example, 3 minutes of CD audio (16-bit PCM, 44.1 kHz) data , which needs about
32M bytes of storage, can be encoded into only 2.7 MBytes of MPEG I audio layer 3
data.
In MPEG II (ISO 13818-3), three additional sampl ing frequencies: 24, 22.05, and 16 kHz
are supported for low bit rates applications.
The AT8xC51SND1C ca n decode in real-time the MPEG I audio layer 3 encoded data
into a PCM audio data, and also supports MPEG II audio layer 3 addition al frequencies.
Additional features are supported by the AT8xC51SND1C MP3 decoder such as volume, bass, medium, and treble co ntrols, bas s boost effect and ancillary data extraction.
Audio Output InterfaceT he AT8xC51SND1C implements an audi o output interface allowing the decoded audio
bitstream to be output in various formats. It is compatible with right and left justification
PCM and I
allows connection of almost all of the commercial audio DAC families a vailable on the
market.
2
S formats and the on-chip P LL (see Section “Clock Gene rator System”)
22
AT8xC51SND1C
4106F–8051–10/02
AT8xC51SND1C
Universal Serial Bus
Interface
MultiMedia Card
Interface
IDE/ATAPI InterfaceThe AT8xC51SND1C provide an IDE/ATAPI interface allowing connection of devices
The AT8xC51SND1C implement a full-speed USB Interface. It can be used for t he following purposes:
•Download of MP3 encoded au dio files by support ing the USB mas s storage class.
•In-System Programming by supporting the USB firmware upgrade class.
The AT8xC51SND1C implement a MultiMedia Card (MMC) interface compliant to the
V2.2 specification in MultiMedia Card mode. The MMC allows storage of MP3 encoded
audio files in removable Flash memory cards that can be easily plugged to, or removed
from the application. It can also be used for In-System Programm ing.
such as CD-ROM reader, CompactFlash
16-bit bi-directional bus part of the low-level ANSI ATA/ATAPI specification. It is provided for mass storage interfaces but could be us ed for In-System Programming using
CD-ROM.
™
cards, Hard Disk Drive, etc. It consi sts of a
Serial I/O InterfaceThe AT8xC51SND1C implement a serial port with its own baud rate generator providing
one single synchronous communication mode and three full-duplex Universal Asynchronous Receiver Transmitter (UART) communication modes. It is provided for the
following purposes:
•In-System Programming.
•Remote control of the AT8xC51SND1C by a host .
Serial Peripheral
Interface
The AT8xC51SND1C implement a Serial P eripheral Interface (SP I) supporting m as t er
and slave modes. It is provided for the following purposes:
•Interfacing DataFlash memory and DataFlash cards for MP3 encoded audio files
storage
•Remote control of the AT8xC51SND1C by a host
•In-System Programming
TWI ControllerThe AT8xC51SND1C implement s a T WI controller supporting the four standard master
and slave modes with multim aster capability. It is provided for the following pur poses:
•Connection of slave devices like LCD controller, audio DAC…
•Remote control of the AT8xC51SND1C by a host
•In-System Programming
A/D ControllerThe AT 8x C51SND1C implements a 2-channel 10-bit (8 true bits) analog-to-digital con-
verter (ADC). It is provided for the following purposes:
•Battery monitoring
•Voice recording
•Corded remote control
Keyboard InterfaceThe A T8x C51 SND1C implement a keyboard interface al lowing connection of 4 x n
matrix key board. It is based on 4 inputs w ith programmable interrupt capability on both
high or l ow level. These inputs are available as an alternate function of P1.3:0 and allow
exit from idle and power-down modes.
4106F–8051–10/02
23
Electrical Characteristics
Absolute Maximum Rating
Storage Temperature......................................... -65 to +150°C
Voltage on any other Pin to V
I
per I/O Pin................................................................. 5 mA
OL
SS ......................................
Power Dissipation............................................................. 1 W
Ambient Temperature Under Bias........................ -40 to +85°C
-0.3to+4.0V
NOTE:Stressingthe device beyond the “Absolute Maxi-
mum Ratings” may cause permanent damage.
These are stress ratings only. Operation beyond
the “operating conditions” is not recommended
and extended exposure beyond the “Operating
Conditions” may affect device reliability.
Note:For operation with most standard crystals, no external components are needed on X1
and X2. It may be necessary to add external capacitors on X1 and X2 to ground in special cases (max 10 pF). X1 and X2 may not be used to drive other circuits.
ParametersTable 36. Oscillator and Crystal Characteristics VDD= 2.7 to 3.3V , TA=-40° to +85°C
4106F–8051–10/02
SymbolParameterMinTypMaxUnit
C
C
C
Internal Capacitance (X1 - VSS)10pF
X1
Internal Capacitance (X2 - VSS)10pF
X2
Equivalent Load Capacitance (X1 - X2)5pF
L
DLDrive Level50µW
FCrystal Frequency20MHz
RSCrystal Series Resistance40Ω
CSCrystal ShuntCapacitance6pF
ParametersTable 38. ISP Pul l-Down Characte ristics V
SymbolParameterMinTypMaxUnit
R
ISP Pull-downResistor2.2kΩ
ISP
= 2.7 to 3.3V , TA=-40° to +85°C
DD
28
AT8xC51SND1C
4106F–8051–10/02
AT8xC51SND1C
AC Characteristics
External 8-bit Bus Cycles
Definition of S ymbolsTable 39. External 8-bit Bus Cycles Timing Symbol Definitions
SignalsConditions
AAddressHHigh
DDataInLLow
LALEVV alid
QData OutXNo Longer Valid
RRD
WWR
TimingsTest conditions: capacitive load on a ll pins = 50 pF.
Table 40. External 8-bit Bus Cy c le – Data Read AC Tim ings
=2.7to3.3V,TA=-40° to +85°C
V
DD
Variable Clock
Standard Mode
Symbol Parameter
T
T
T
T
T
T
T
T
T
T
T
T
T
Clock Period5050ns
CLCL
ALE Pulse Width2·T
LHLL
Address Valid to ALE LowT
AVLL
Address Hold after ALE LowT
LLAX
ALE Low to RD Low3·T
LLRL
RD Pulse Width6·T
RLRH
RD High to ALE HighT
RHLH
Address Valid to Valid Data In9·T
AVDV
Address Valid to RD Low4·T
AVRL
RD Low to Valid Data5·T
RLDV
RD Low to address Float00ns
RLAZ
Data Hold After RD High00ns
RHDX
Instruction Float after RD
RHDZ
High
-15T
CLCL
-200.5·T
CLCL
-200.5·T
CLCL
-301.5·T
CLCL
-253·T
CLCL
-20T
CLCL
-302·T
CLCL
CLCL
2·T
ZFloating
Variable Clock
X2 Mode
-15ns
CLCL
-20ns
CLCL
-20ns
CLCL
-30ns
CLCL
-25ns
CLCL
+200.5·T
-654.5·T
CLCL
-302.5·T
CLCL
-25T
CLCL
-200.5·T
CLCL
-30ns
CLCL
CLCL
CLCL
CLCL
-25ns
CLCL
UnitMinMaxMinMax
+20ns
-65ns
-30ns
4106F–8051–10/02
29
Table 41. External 8-bit Bus Cyc le – Data Write AC Timings
=2.7to3.3V,TA=-40° to +85°C
V
DD
Variable Clock
Standard Mode
Symbol Parameter
T
T
T
T
T
T
T
T
T
T
Clock Period5050ns
CLCL
ALE Pulse Width2·T
LHLL
Address Valid to ALE LowT
AVLL
AddressHold after ALE
LLAX
Low
ALE Lowto WR Low3·T
LLWL
WR Pulse Width6·T
WLWH
WR High to ALE HighT
WHLH
Address Valid to WR Low4·T
AVWL
Data Valid toWR High7·T
QVWH
Data Hold after WR HighT
WHQX
-15T
CLCL
-200.5·T
CLCL
T
-200.5·T
CLCL
-301.5·T
CLCL
-253·T
CLCL
-20T
CLCL
-302·T
CLCL
-203.5·T
CLCL
-150.5·T
CLCL
CLCL
+200.5·T
CLCL
CLCL
CLCL
CLCL
CLCL
CLCL
CLCL
CLCL
CLCL
WaveformsFigure 15. External 8-bit Bus Cycle – Dat a Re ad Waveforms
ALE
T
LHLL
T
LLRL
T
RLRH
Variable Clock
X2 Mode
UnitMinMaxMinMax
-15ns
-20ns
-20ns
-30ns
-25ns
-200.5·T
+20ns
CLCL
-30ns
-20ns
-15ns
T
RHLH
RD
P0
P2
T
AVLL
T
T
AVRL
T
LLAX
RLAZ
T
AVDV
T
RLDV
A15:8
D7:0A7:0
Data In
T
T
RHDZ
RHDX
30
AT8xC51SND1C
4106F–8051–10/02
AT8xC51SND1C
Figure 16. External 8-bit B us Cycle – Data W rite Wave forms
ALE
T
LHLL
T
LLWL
T
WLWH
WR
T
AVWL
T
P0
AVLL
A7:0
T
LLAX
T
QVWH
T
D7:0
Data Out
P2
A15:8
External IDE 16-bit Bus Cycles
Definition of S ymbolsTable 42. External IDE 16-bit Bus Cycles Timing Symbol D efinitions
SignalsConditions
AAddressHHigh
DDataInLLow
LALEVV alid
QData OutXNo Longer Valid
RRD
ZFloating
T
WHQX
WHLH
WWR
TimingsTest conditions: capacitive load on a ll pins = 50 pF.
4106F–8051–10/02
31
Table 43. External I D E 16-bi t Bus Cycle – Data Read A C Timings
= 2.7 to 3.3V, TA=-40° to +85°C
V
DD
Symbol Parameter
T
T
T
T
T
T
T
T
T
T
T
T
T
Clock Period5050ns
CLCL
ALE Pulse Width2·T
LHLL
AddressValid to ALE LowT
AVLL
AddressHold after ALELowT
LLAX
ALE Low to RD Low3·T
LLRL
RD Pulse Width6·T
RLRH
RD High to ALE HighT
RHLH
AddressValid to ValidData In9·T
AVDV
AddressValid to RDLow4·T
AVRL
RD Low to Valid Data5·T
RLDV
RD Low to Address Float00ns
RLAZ
Data Hold after RD High00ns
RHDX
Instruction Float after RD
RHDZ
High
Variable Clock
Standard Mode
-15T
CLCL
-200.5·T
CLCL
-200.5·T
CLCL
-301.5·T
CLCL
-253·T
CLCL
-20T
CLCL
-302·T
CLCL
+200.5·T
CLCL
-654.5·T
CLCL
-302.5·T
CLCL
2·T
-25T
CLCL
Variable Clock
X2 Mode
-15ns
CLCL
-20ns
CLCL
-20ns
CLCL
-30ns
CLCL
-25ns
CLCL
-200.5·T
CLCL
-30ns
CLCL
+20ns
CLCL
-65ns
CLCL
-30ns
CLCL
-25ns
CLCL
UnitMinMaxMinMax
Table 44. External I DE 16-bi t Bus Cycle – D ata Write AC Tim ings
=2.7to3.3V,TA=-40° to +85°C
V
DD
Symbol Parameter
T
T
T
T
T
T
T
T
T
T
ClockPeriod5050ns
CLCL
ALE Pulse Width2·T
LHLL
Address Validto ALE LowT
AVLL
Address HoldafterALE LowT
LLAX
ALE Low to WR Low3·T
LLWL
WR Pulse Width6·T
WLWH
WR High to ALE HighT
WHLH
Address Validto WR Low4·T
AVWL
DataValidtoWRHigh7·T
QVWH
Data Hold after WR HighT
WHQX
Variable Clock
Standard Mode
-15T
CLCL
-200.5·T
CLCL
-200.5·T
CLCL
-301.5·T
CLCL
-253·T
CLCL
-20T
CLCL
-302·T
CLCL
-203.5·T
CLCL
-150.5·T
CLCL
+200.5·T
CLCL
Variable Clock
-15ns
CLCL
-20ns
CLCL
-20ns
CLCL
-30ns
CLCL
-25ns
CLCL
-200.5·T
CLCL
-30ns
CLCL
-20ns
CLCL
-15ns
CLCL
X2 Mode
+20ns
CLCL
UnitMinMaxMinMax
32
AT8xC51SND1C
4106F–8051–10/02
AT8xC51SND1C
WaveformsFigure 17. External IDE 16-bit Bus Cycle – Data Read Wav ef orms
ALE
T
LHLL
T
LLRL
T
RLRH
RD
T
P0
P2
T
AVLL
T
T
AVRL
T
LLAX
RLAZ
T
AVDV
RLDV
D7:0A7:0
Data In
D15:81A15:8
T
T
RHDX
Data In
Note:D15:8 is written in DAT16H SFR.
Figure 18. External IDE 16-bit B us Cycle – Data Write Waveforms
ALE
WR
T
LHLL
T
AVLL
T
T
AVWL
LLAX
T
LLWL
T
T
WLWH
QVWH
T
RHDZ
T
WHQX
RHLH
T
WHLH
P0
P2
A7:0
A15:8
Note:D15:8 is the content of DAT16H SFR.
SPI Interface
Definition of S ymbolsTable 45. SPI Interface Timing Symbol Definitions
SignalsConditions
CClockHHigh
IDataInLLow
OData OutVValid
D7:0
Data Out
D15:81
Data Out
XNo Longer Valid
ZFloating
4106F–8051–10/02
33
TimingsTable 46. SPI Interface Master AC Tim ing
VDD=2.7to3.3V,TA=-40° to +85°C
SymbolParameterMinMaxUnit
Slave Mode
(2)
T
CHCH
T
CHCX
T
CLCX
T
SLCH,TSLCL
T
IVCL,TIVCH
T
CLIX,TCHIX
T
CLOV,TCHOV
T
CLOX,TCHOX
T
CLSH,TCHSH
T
IVCL,TIVCH
T
CLIX,TCHIX
T
SLOV
T
SHOX
T
SHSL
T
ILIH
T
IHIL
T
OLOH
T
OHOL
Clock Period8T
Clock High Time3.2T
Clock Low Time3.2T
OSC
OSC
OSC
SS Low to Clockedge200ns
Input Data Valid to Clock Edge100ns
Input Data Hold afterClock Edge100ns
Output Data Valid after Clock Edge100ns
Output Data Hold Time after Clock Edge0ns
SS High after Clock Edge0ns
Input Data Valid to Clock Edge100ns
Input Data Hold afterClock Edge100ns
SS Low to Output DataValid130ns
Output Data Hold after SS High130ns
SS High to SS LowNote
(1)
Input Rise Time2µs
Input Fall Time2µs
Output Rise Time100ns
Output Fall Time100ns
MasterMode
34
T
CHCH
T
CHCX
T
CLCX
T
IVCL,TIVCH
T
CLIX,TCHIX
T
CLOV,TCHOV
T
CLOX,TCHOX
T
ILIH
T
IHIL
T
OLOH
T
OHOL
Notes: 1. Value of this parameter depends on software.
AT8xC51SND1C
Clock Period4T
Clock High Time1.6T
Clock Low Time1.6T
Input Data Valid to Clock Edge50ns
Input Data Hold after Clock Edge50ns
Output Data Valid after Clock Edge65ns
Output Data Hold Time after Clock Edge0ns
InputDataRiseTime2µs
Input Data FallTime2µs
Output Data Rise Time50ns
Output Data Fall Time50ns
2. Test conditions:capacitive load on all pins = 100 pF
OSC
OSC
OSC
4106F–8051–10/02
Waveforms
Figure 19. SPI Slave Waveforms (SSCPHA = 0)
(1)
SS
(input)
T
SLCH
T
SLCL
SCK
(SSCPOL = 0)
(input)
SCK
(SSCPOL = 1)
(input)
MISO
(output)
MOSI
(input)
T
T
SLOV
SLAVE MSB OUTSLAVE LSB OUTBIT 6
T
T
IVCH
T
T
IVCL
MSB INBIT 6LSBI N
CHCX
CHIX
CLIX
T
CHCH
T
CLCX
T
T
CLOV
CHOV
T
T
CLOX
CHOX
T
T
CLCH
CHCL
AT8xC51SND1C
T
CLSH
T
CHSH
T
SHSL
T
SHOX
1
Note:1. Not Defined but generally the MSB of the character, which has just been received.
Figure 20. SPI Slave Waveforms (SSCPHA = 1)
(1)
SS
1
(output)
T
CHCH
SCK
(SSCPOL = 0)
(output)
T
CHCX
T
CLCX
SCK
(SSCPOL = 1)
(output)
SI
(input)
SO
(output)
T
T
IVCH
CHIX
T
IVCLTCLIX
MSB INBIT 6LSB IN
T
CLOV
T
CHOV
MSB OUTPort DataLSB OUTPort DataBIT 6
Note:1. Not Defined but generally the LSB of the character, which has just been received.
T
T
CLCH
CHCL
T
T
CLOX
CHOX
4106F–8051–10/02
35
Figure 21. SPI Master Waveforms (S S C PHA = 0)
(1)
SS
1
(input)
T
SLCH
T
SLCL
T
CHCH
SCK
(SSCPOL = 0)
(input)
T
CHCX
T
CLCX
SCK
(SSCPOL = 1)
(input)
T
SLOV
MISO
(output)
MOSI
(input)
SLAVE MSB OUTSLAVE LSB OUTBIT 6
1
T
T
IVCH
CHIX
T
T
IVCL
CLIX
MSB IN
Note:SS handled by software using general purpose port pin.
Figure 22. SPI Master Waveforms (S S C PHA = 1)
(1)
SS
1
(output)
T
CHCH
SCK
(SSCPOL = 0)
(output)
SCK
(SSCPOL = 1)
(output)
(input)
SO
(output)
T
SI
T
T
IVCH
T
IVCLTCLIX
CLCX
CHIX
CHCX
T
MSB INBIT 6LSB IN
T
CLOV
T
CHOV
MSB OUTPortDataLSB OUTPort DataBIT 6
T
CLCH
T
CHCL
T
T
CHOV
CLOV
T
T
CHOX
CLOX
BIT 6LSB IN
T
CLCH
T
CHCL
T
CLOX
T
CHOX
T
T
CLSH
CHSH
T
SHSL
T
SHOX
Note:SS handled by software using general purpose port pin.
Notes: 1. At 100 kbit/s. At other bit-rates this value is inversely proportional to the bit-rate of
100 kbit/s.
2. Determined by the external bus-line capacitance and the external bus-line pull-up
resistor, this must be < 1 µs.
3. Spikes on the SDA and SCL lines with a duration of less than 3·
TCLCL will be filtered
out. Maximum capacitance on bus-lines SDA and SCL = 400 pF.
4.
TCLCL =T
= one oscillator clock period.
OSC
Waveforms
Figure 23. TWI Waveforms
STARTorRepeatedSTART Condition
SDA
(INPUT/OUTPUT)
SCL
(INPUT/OUTPUT)
4106F–8051–10/02
T
FD
THD;STA
Repeated START Condition
T
T
rd
STOP Condition
SU
;STA
Tsu;STO
T
DAT3
T
rc
T
fc
su;
0.7 V
0.3 V
T
T
HIGH
LOW
TSU;DAT1
THDDAT
Tsu;DAT2
STARTCondition
T
buf
DD
DD
0.7 V
0.3 V
DD
DD
37
MMC Interface
Definition of S ymbolsTable 48. MMC Interface Timing Symbol Definitions
SignalsConditions
CClockHHigh
DDataInLLow
OData OutVValid
TimingsTable 49. MMC Interface AC Timings
=2.7to3.3V,TA=0to70°C, CL ≤ 100 pF (10 Cards)
V
DD
SymbolParameterMinMaxUnit
XNo Longer Valid
T
T
T
T
T
T
T
T
T
CHCH
CHCX
CLCX
CLCH
CHCL
DVCH
CHDX
CHOX
OVCH
Clock Period50n s
Clock High Time10ns
Clock Low Time10ns
Clock Rise Time10ns
Clock Fall Time10ns
Input Data Validto Clock High3ns
Input Data Hold after Clock High3ns
Output Data Hold after Clock High5ns
Output Data Valid to Clock High5ns
WaveformsFigure 24. MM C Input-Output Waveforms
T
CHCX
MCLK
T
CHIX
MCMD Input
MDAT Input
T
CHOX
MCMD Output
MDAT Output
T
CHCL
T
CHCH
T
CLCX
T
T
OVCH
CLCH
T
IVCH
38
AT8xC51SND1C
4106F–8051–10/02
Audio I nterface
Definition of S ymbolsTable 50. Audio Interface Timing Symbol Defini tions
SignalsConditions
CClockHHigh
OData OutLLow
SData SelectVValid
TimingsTable 51. Audio Interface AC Timings
=2.7to3.3V,TA=0to70°C, CL ≤ 30pF
V
DD
SymbolParameterMinMaxUnit
T
CHCH
T
CHCX
T
CLCX
T
CLCH
T
CHCL
T
CLSV
T
CLOV
Note:32-bit format with Fs = 48 kHz.
ClockPeriod325.5
ClockHigh Time30ns
Clock Low Time30ns
ClockRise Time10ns
Clock Fall Time10ns
Clock Low to Select Valid10ns
Clock Low to Data Valid10ns
AT8xC51SND1C
XNo Longer Valid
(1)
ns
WaveformsFigure 25. Audio Interface Waveforms
T
CHCX
DCLK
DSEL
DDAT
T
CLOV
RightLeft
T
CHCL
T
CHCH
T
CLSV
T
CLCX
T
CLCH
4106F–8051–10/02
39
Analog to Digital Converter
Definition of S ymbolsTable 52. Analog to Digital Converter Timing Symbol Definitions
SignalsConditions
CClockHHigh
EEnable (ADEN bit)LLow
S
Start Conversion
(ADSST bit)
CharacteristicsTable 53. Analog-to-Digital Converter AC C harac t eristics
=2.7to3.3V,TA=0to70°C
V
DD
SymbolParameterMinMaxUnit
T
CLCL
T
EHSH
T
SHSL
D
LE
I
LE
O
SE
G
E
Notes: 1. AVDD=AV
code.
2. The differential non-linearity is the difference between the actual step width and the
ideal step width (see Figure 27).
3. The integral non-linearity is the peak difference between the center of the actual step
and the ideal transfer curve after appropriate adjustment of gain and offset errors
(see Figure 27).
4. The offset error is the absolute difference between the straight line, which fits the
actual transfercurve(after removing of gain error); and the straight line, which fits the
ideal transfer curve (see Figure 27).
5. The gain error is t he relative difference in percent between the straight line which fits
the actual transfer curve (after removing of offset error); and the straight line, which
fits the ideal transfer curve (see Figure 27).
Atmel Corpora tion makes no w a r r an t y for the use of its product s, other than those expressly c ontained in the Company’s standard warran ty
which is detailed in Atmel’s Terms and Conditions located on the Company’s web site. The Company assumes no responsibility for any errors
which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does
not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted
by the Com pan y in connec ti on with the sale of Atmel p r oducts, express ly or by im plication . Atmel’s products are no t author iz ed for use as c r it i c al
components in life support devices or systems.
ATMEL®and DataFlash®are registered tradema rk of Atmel. MultiMedi a Card®is a registered trademark of
MultiM ed ia Co r o poration. Sm artMedia
trademark of CompactFlash Corporation.
Other term s and pro du c t nam es ma y be the trad em a r ks of oth ers.
®
is a registered trademark of Toshiba Corporation. CompactFlash™is a
Printedonrecycledpaper.
4106F–8051–10/02/0M
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.