278
ABOV Semiconductor Co., Ltd.
USInDR (USI0/1 Data Register: For UART, SPI and I2C mode) : 403CH/404CH (XSFR), n = 0 and 1
Initial value : 00H
The USIn 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
USInDR register. Reading the USInDR register returns the contents of the receive
buffer.
Write to this register only when the DREn flag is set. In SPI master mode, the SCK
clock is generated when data are written to this register.
USInSDHR (USI0/1 SDA Hold Time Register: For I2C mode) : 403BH/404BH (XSFR), n = 0 and 1
Initial value : 01H
The register is used to control SDAn output timing from the falling edge of SCLn in
I2C mode.
NOTE)
1. That SDA is changed after t
SCLK
X USInSDHR. In master
mode, load half the value of USInSCLR to this register to
make SDA change in the middle of SCL.
2. In slave mode, configure this register regarding the
frequency of SCL from master.
3. The SDA is changed after t
SCLK
X (USInSDHR+2) in master
mode. So, to insure operation in slave mode, the value
t
SCLK
X (USInSDHR + 1) must be smaller than the period of
SCL.
USInSCHR (USI0/1 SCL High Period Register: For I2C mode) : 403EH/404EH (XSFR), n = 0 and 1
Initial value : 3FH
This register defines the high period of SCLn when it operates in I2C master mode.
The base clock is SCLK, the system clock and the period is calculated by the
formula: t
SCLK
X (4 X USInSCHR + 2) where t
SCLK
is the period of SCLK.
So, the operating frequency of I2C master mode is calculated by the following equation.
t
SCLK
X (4 X (USInSCLR + USInSCHR) + 4)