152
ABOV Semiconductor Co., Ltd.
11.9.11 Register Description for I2C
I2CDR (I2C Data Register) : ECH
Initial value : 00H
The I2CDR transmit buffer and receive buffer share the same I/O address with this
DATA register. The transmit data buffer is the destination for data written to the
I2CDR register. Reading the I2CDR register returns the contents of the receive
buffer.
I2CSDHR (I2C SDA Hold Time Register) : EDH
Initial value : 01H
The register is used to control SDA output timing from the falling edge of SCL.
Note that SDA is changed after t
SCLK
X (I2CSDHR+2), in master mode, load half the
value of I2CSCLR to this register to make SDA change in the middle of SCL.
In slave mode, configure this register regarding the frequency of SCL from master.
The SDA is changed after tsclk X (I2CSDHR+2) in master mode. So, to insure
operation in slave mode, the value
t
SCLK
X (I2CSDHR +2) must be smaller than the period of SCL.
I2CSCHR (I2C SCL High Period Register) : EFH
Initial value : 3FH
This register defines the high period of SCL in master mode.
The base clock is SCLK, the system clock, and the period is calculated by the
formula: t
SCLK
X (4 X I2CSCHR + 2) where
t
SCLK
is the period of SCLK.
So, the operating frequency of I2C master mode is calculated by the following equation.
I2CSCLR (I2C SCL Low Period Register) : EEH
Initial value : 3FH
This register defines the low period of SCL in master mode.
The base clock is SCLK, the system clock, and the period is calculated by the
formula: t
SCLK
X (4 X I2CSCLR + 2) where
t
SCLK
is the period of SCLK.
t
SCLK
X (4 X (I2CSCLR + I2CSCHR) + 4)