English
Language : 

AT89SND2CMP3B_14 Datasheet, PDF (66/242 Pages) ATMEL Corporation – Stand-alone MP3 Decoder
13.3.3
CRC Error
When the CRC of a frame does not match the one calculated, the flag ERRCRC in MP3STA is
set. In this case, depending on the CRCEN bit in MP3CON, the frame is played or rejected. In
both cases, noise may appear at audio output.
13.4 Frame Information
The MP3 frame header contains information on the audio data contained in the frame. These
informations is made available in the MP3STA register for you information. MPVER and
MPFS1:0 bits allow decoding of the sampling frequency according to Table 13-4. MPVER bit
gives the MPEG version (2 or 1).
Table 13-4. MP3 Frame Frequency Sampling
MPVER
0
0
0
0
1
1
1
1
MPFS1
0
0
1
1
0
0
1
1
MPFS0
0
1
0
1
0
1
0
1
Fs (kHz)
22.05 (MPEG II)
24 (MPEG II)
16 (MPEG II)
Reserved
44.1 (MPEG I)
48 (MPEG I)
32 (MPEG I)
Reserved
13.5 Ancillary Data
MP3 frames also contain data bits called ancillary data. These data are made available in the
MP3ANC register for each frame. As shown in Figure 13-4, the ancillary data are available by
Bytes when MPANC flag in MP3STA register is set. MPANC flag is set when the ancillary buffer
is not empty (at least one ancillary data is available) and is cleared only when there is no more
ancillary data in the buffer. This flag can generate an interrupt as explained in Section "Inter-
rupt", page 66. When set, software must read all Bytes to empty the ancillary buffer.
Figure 13-4. Ancillary Data Block Diagram
Ancillary 8
Data To C51
MP3ANC
8
7-Byte
Ancillary Buffer
MPANC
MP3STA.7
13.6 Interrupt
13.6.1
Description
As shown in Figure 13-5, the MP3 decoder implements five interrupt sources reported in ERR-
CRC, ERRSYN, ERRLAY, MPREQ, and MPANC flags in MP3STA register.
All these sources are maskable separately using MSKCRC, MSKSYN, MSKLAY, MSKREQ, and
MSKANC mask bits respectively in MP3CON register.
The MP3 interrupt is enabled by setting EMP3 bit in IEN0 register. This assumes interrupts are
globally enabled by setting EA bit in IEN0 register.
66 AT8xC51SND2C/MP3B
4341H–MP3–10/07