21 I
2
S
21-2
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
The I
2
S output pins (I2S_SDO, I2S_WS, I2S_SCLK, I2S_MCLK) are shared with I/O ports and are initially set as
general purpose I/O port pins. The pin functions must be switched using the port function select bits to use the gen-
eral purpose I/O port pins as I
2
S output pins.
For detailed information on pin function switching, see the “I/O Ports (GPIO)” chapter.
I
21.3
2
S Module Operating Clock
The I
2
S module uses PCLK1 generated by the CMU as the operating clock.
For more information on the PCLK1 supply control, see the “Clock Management Unit (CMU)” chapter.
Setting the I
21.4
2
S Module
When performing data transfers via the I
2
S bus, the following settings must be made before data transfer is actually
begun:
1. Setting the output pins
2. Setting the I
2
S interface clocks
3. Setting the data format and timing
4. Setting interrupt or DMA conditions (see Section 21.6.)
The following describes the settings.
Note: Always make sure the I
2
S module is not started (I2SSTART/I2S_START register = 0) before these
settings are made. A change of settings during operation may cause a malfunction.
Setting the output pins
Configure the port function select bits to enable the I
2
S output functions. For details of pin functions and how
to switch over, see the “I/O Ports (GPIO)” chapter.
Setting the I
2
S interface clocks
The I
2
S module outputs the following three clocks:
1. I2S_MCLK (master clock)
2. I2S_SCLK (bit clock)
3. I2S_WS (word-select clock)
D0
D15
D2
D1
D0
D15 D14
D2
D1
D14
D0
I2S_MCLK
I2S_WS
I2S_SCLK
I2S_SDO
(L channel)
(R channel)
4.1 I
Figure 21.
2
S Interface Clocks
The following shows the configurable clock conditions and their control bits. For more information on clock
setting, see Section 21.8, “Setting the I
2
S Clocks.”
Division ratio for I2S_MCLK (master clock)
The I
2
S module generates I2S_MCLK to be output from the I2S_MCLK pin by dividing the PCLK1 gener-
ated by the CMU. Specify the division ratio using MCLKDIV[5:0]/I2S_DV_MCLK register.