
V PeRiPheRaL MoDuLes 3 (inteRFaCe): i2s inteRFaCe (i2s)
V-4-16
ePson
s1C33L17 teChniCaL ManuaL
V.4.6 Data input Control (Ch.1)
The following shows audio data input procedure:
1. Set up the I2S conditions as described in Section V.4.4.
2. Set up the interrupt conditions as described in Section V.4.4. Also the ITC registers must be set up (explained
later).
3. Write 1 to the I2SEN1 (D0/pI2S_CONTRL_CH1 register) to turn the I2S CH.1 circuit on.
i2sen1: I2S CH.1 Enable Bit in the I2S CH.1 Control (pI2S_CONTRL_CH1) Register (D0/0x00301C04)
4. Write 1 to I2SSTART1 (D8/pI2S_START register) to start receiving.
The I2S CH.1 circuit enables the clock input from the I2S_WS_I and I2S_SCK_I pins.
i2sstaRt1: I2S CH.1 Start/Stop Control Bit in the I2S Start/Stop (pI2S_START) Register (D8/0x00301C10)
The I2S CH.1 starts data receiving at the first falling or rising edge of the I2S_WS_I input clock that goes to the
L channel level according to the WCLKMD1 (D5/pI2S_CONTRL_CH1 register) setting.
WCLKMD1: I2S CH.1 Input Word Clock Mode Select Bit in the I2S CH.1 Control (pI2S_CONTRL_CH1)
Register (D5/0x00301C04)
The data bits are sampled at the rising or falling edge of the I2S_SCK_I input clock specified by BCLKPOL1
(D4/pI2S_CONTRL_CH1 register) and received in the receive shift register.
BCLKPoL1: I2S CH.1 Input Bit Clock Polarity Select Bit in the I2S CH.1 Control (pI2S_CONTRL_CH1)
Register (D4/0x00301C04)
For 16-bit data, after each 16-bit data is received in the shift register, the received data is loaded to the receive
FIFO. Assume that the first received 16 bits are L channel data and the following 16 bits are R channel data.
For 24-bit data, after each 24-bit data is received in the shift register, the received data is loaded to the receive
FIFO. Assume that the first received 24 bits are L channel data and the following 24 bits are R channel data.
Up to four stereo data (24 or 16 bits
× 2 channels (L & R) × 4) can be stored in the FIFO.
When the number of data according to the interrupt mode has been loaded to the FIFO, an interrupt can be gen-
erated.
In half full interrupt mode (default), the I2S module generates an interrupt after two stereo data has been re-
ceived in the FIFO. In this case, read two stereo data (24 or 16 bits
× 2 channels (L & R) × 2) from the FIFO.
In whole full interrupt mode, the I2S module generates an interrupt after four stereo data has been received in
the FIFO (the FIFO becomes full). In this case, read four stereo data (24 or 16 bits
× 2 channels (L & R) × 4)
from the FIFO.
In one data interrupt mode, the I2S module generates an interrupt after one stereo data has been received in the
FIFO. In this case, read one stereo data (24 or 16 bits
× 2 channels (L & R) × 1) from the FIFO.
If the FIFO becomes full, the I2SFIFOFF1 flag (D9/pI2S_FIFO_STATUS register) is set to 1. Note that the lat-
est stereo data in the FIFO will be overwriten with the newly-received data if it has not been read out within 1
word clock cycle.
i2sFiFoFF1: I2S CH.1 FIFO Full Flag in the I2S FIFO Status (pI2S_FIFO_STATUS) Register (D9/
0x00301C14)
When data is read out from the FIFO, I2SFIFOFF1 is reset to 0.