AT8xC51SND2C
Figure 51. MP3 Mode Audio Configuration Flow
MP3 Mode
Configuration
Enable DAC System
Clock
Program Audio Clock
AUDEN = 1
Configure Interface
HLR = X
Wait For
DAC Set-up Time
DSIZ = X
POL = X
JUST4:0 = XXXXXb
SRC = 0
Enable Data Request
DRQEN = 1
Voice or Sound Playing
In voice or sound playing mode, the operations required are to configure the PLL and
the audio interface according to the DAC selected. The audio clock is programmed to
generate the 256·Fs or 384·Fs as for the MP3 playing mode. The data flow sent by the
C51 is then regulated by interrupt and data is loaded 4 Bytes by 4 Bytes. Figure 52
shows the configuration flow of the audio interface when in voice or sound mode.
Figure 52. Voice or Sound Mode Audio Flows
Voice/Song Mode
Configuration
Audio Interrupt
Service Routine
Wait for DAC
Enable Time
Program Audio Clock
Sample Request?
SREQ = 1?
Configure Interface
HLR = X
Select Audio
SRC = 1
DSIZ = X
Load 4 Samples in the
Audio Buffer
Under-run Condition1
POL = X
JUST4:0 = XXXXXb
DUP1:0 = XX
Load 8 Samples in the
Audio Buffer
Enable DAC System
Clock
Enable Interrupt
Set MSREQ & MUDRN1
EAUD = 1
AUDEN = 1
Note:
1. An under-run occurrence signifies that C51 core did not respond to the previous sample request interrupt. It may never
occur for a correct voice/sound generation. It is the user’s responsibility to mask it or not.
77
4341D–MP3–04/05