Download Atmel AT89C5132 Datasheet
Transcript
AT89C5132 Figure 42. Audio Output Format DSEL DCLK DOUT Left Channel 1 2 3 Right Channel 13 14 15 LSB MSB B14 16 B1 1 2 3 13 14 15 LSB MSB B14 16 B1 I2S Format with DSIZ = 0 and JUST4:0 = 00001. DSEL DCLK Left Channel 1 DOUT 2 Right Channel 3 17 MSB B14 LSB 18 32 1 2 3 17 MSB B14 LSB 18 32 I2S Format with DSIZ = 1 and JUST4:0 = 00001. DSEL DCLK DOUT Left Channel 1 2 3 Right Channel 13 14 MSB B14 15 B1 16 1 2 3 13 14 LSB MSB B15 15 B1 16 LSB MSB/LSB Justified Format with DSIZ = 0 and JUST4:0 = 00000. DSEL DCLK Left Channel 1 16 DOUT 17 Right Channel 18 31 MSB B14 B1 32 1 16 LSB 17 18 31 MSB B14 B1 32 LSB 16-bit LSB Justified Format with DSIZ = 1 and JUST4:0 = 10000. DSEL DCLK DOUT Left Channel 1 15 16 MSB B16 Right Channel 30 B2 31 B1 32 LSB 1 15 16 MSB B16 30 B2 31 B1 32 LSB 18-bit LSB Justified Format with DSIZ = 1 and JUST4:0 = 01110. The data converter receives its audio stream from two sources selected by the SRC bit in AUDCON1 register. As soon as first audio data is input to the data converter, it enables the clock generator for generating the bit and word clocks. Audio Buffer In voice or sound playing mode, the audio stream comes from the C51 core through an audio buffer. The data is in 8-bit format and is sampled at 8 kHz. The audio buffer adapts the sample format and rate. The sample format is extended to 16 Bits by filling the LSB to 00h. Rate is adapted to the DAC rate by duplicating the data using DUP1:0 Bits in AUDCON1 register according to Table 50. The audio buffer interfaces to the C51 core through three flags: the sample request flag (SREQ in AUDSTA register), the under-run flag (UNDR in AUDSTA register) and the busy flag (AUBUSY in AUDSTA register). SREQ and UNDR can generate an interrupt request as explained in Section "Interrupt Request", page 62. The buffer size is 8 Bytes large. SREQ is set when the samples number switches from 4 to 3 and reset when the samples number switches from 4 to 5; UNDR is set when the buffer becomes empty signaling that the audio interface ran out of samples; and AUBUSY is set when the buffer is full. 61 4173C–USB–07/04