21 I
2
S
21-22
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Setting the I
21.8
2
S Clocks
This section explains how to configure the I2S_MCLK, I2S_WS, and I2S_SCLK clocks.
The following shows how to determine the clock setting values from the sampling rate. The example below as-
sumes that the system clock frequency is 33 MHz and the sampling rate of audio data is 44.1 kHz.
The sample clock (I2S_WS) is in sync with the master clock (I2S_MCLK), so the following equation is formu-
lated:
f
I2S_MCLK
————— = Integer
f
I2S_WS
where f
I2S_MCLK
is the output master clock (I2S_MCLK) frequency and f
I2S_WS
is the sample clock (I2S_WS)
frequency.
33 MHz
f
I2S_MCLK
= —————————
(eq1)
MCLKDIV[5:0] + 1
33 MHz
f
I2S_WS
= ————— ————— ———————————————
(eq2)
(BCLKDIV[7:0] + 1) × 2 × (WSCLKCYC[4:0] + 16 ) × 2
(BCLKDIV[7:0] + 1) × 2 × (WSCLKCYC[4:0] + 16 ) × 2
————————————————————————— = Integer
(eq3)
MCLKDIV[5:0] + 1
8.1 I2S_MCLK (Master Clock) Settings
Table 21.
MCLKDIV[5:0]
PCLK1 division ratio
0x3f
1/64
0x3e
1/63
0x3d
1/62
:
:
0x2
1/3
0x1
1/2
0x0
1/1
8.2 I2S_SCLK (Bit Clock) Settings
Table 21.
BCLKDIV[7:0]
PCLK1 division ratio
0xff
1/512
0xfe
1/510
0xfd
1/508
:
:
0x2
1/6
0x1
1/4
0x0
1/2
8.3 Sample Clock Period Settings
Table 21.
WSCLKCYC[4:0]
Sample clock period
(number of bit clock cycles)
0x1f–0x11
Reserved
0x10
32 clocks
0xf
31 clocks
0xe
30 clocks
0xd
29 clocks
0xc
28 clocks
0xb
27 clocks
0xa
26 clocks
0x9
25 clocks
0x8
24 clocks
0x7
23 clocks
0x6
22 clocks
0x5
21 clocks
0x4
20 clocks
0x3
19 clocks
0x2
18 clocks
0x1
17 clocks
0x0
16 clocks