beautypg.com

Frame information, Ancillary data, At8xc51snd1c – Rainbow Electronics AT89C51SND1C User Manual

Page 65

background image

65

AT8xC51SND1C

4109E–8051–06/03

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 71. MPVER bit gives the MPEG version (2 or 1).

Table 71. MP3 Frame Frequency Sampling

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 45, 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 "Interrupt", page 66. When set, software must read all
Bytes to empty the ancillary buffer.

Figure 45. Ancillary Data Block Diagram

MPVER

MPFS1

MPFS0

Fs (kHz)

0

0

0

22.05 (MPEG II)

0

0

1

24 (MPEG II)

0

1

0

16 (MPEG II)

0

1

1

Reserved

1

0

0

44.1 (MPEG I)

1

0

1

48 (MPEG I)

1

1

0

32 (MPEG I)

1

1

1

Reserved

Ancillary

Data To C51

8

MP3ANC

8

MPANC

MP3STA.7

7-Byte

Ancillary Buffer