Toshiba H1 Series Data Book page 360

32bit micro controller tlcs-900/h1 series
Table of Contents

Advertisement

3.15.6 Data Transfer in I
(1) Device initialization
Set the SBICR1<ACK, SCK2:0>, Set SBIBR1 to "1" and clear bits 7 to 5 and 3 in the
SBICR1 to "0".
Set a slave address <SA6:0> and the <ALS> (<ALS> = "0" when an addressing format)
to the I2CAR.
For specifying the default setting to a slave receiver mode, clear "0" to the <MST, TRX,
BB> and set "1" to the <PIN>, "10" to the <SBIM1:0>.
SBICR1
I2CAR
SBICR2
Note: X: Don't care
(2) Start condition and slave address generation
a. Master Mode
In the Master Mode, the start condition and the slave address are generated as
follows.
Check a bus free status (when <BB> = "0").
Set the SBICR1<ACK> to "1" (Acknowledge Mode) and specify a slave address
and a direction bit to be transmitted to the SBIDBR.
When SBICR2<BB> = "0", the start condition are generated by writing "1111" to
SBICR2<MST, TRX, BB, PIN>. Subsequently to the start condition, nine clocks
are output from the SCL pin. While eight clocks are output, the slave address and
the direction bit which are set to the SBIDBR. At the 9th clock, the SDA line is
released and the acknowledge signal is received from the slave device.
An INTSBI interrupt request occurs at the falling edge of the 9th clock. The
<PIN> is cleared to "0". In the Master Mode, the SCL pin is pulled down to the
Low-level while <PIN> is "0". When an interrupt request occurs, the <TRX> is
changed according to the direction bit only when an acknowledge signal is
returned from the slave device.
Setting in main routine
Reg.
Reg.
if Reg.
Then
SBICR1
SBIDBR1 ← X X X X X X X X
SBICR2
In INTSBI interrupt routine
INTCLR ← 0X2a
Process
End of interrupt
2
C Bus Mode
7 6 5 4 3 2 1 0
← 0 0 0 X 0 X X X
← X X X X X X X X
← 0 0 0 1 1 0 0 0
7 6 5 4 3 2 1 0
← SBISR
← Reg. e 0x20
≠ 0x00
← X X X 1 X X X X
← 1 1 1 1 1 0 0 0
Clear the interrupt request
92CZ26A-357
Set acknowledge and SCL clock.
Set slave address and address recognition mode.
Set to slave receiver mode.
Wait until bus is free.
Set to acknowledgement mode.
Set slave address and direction bit.
Generate start condition.
TMP92CZ26A

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900Tmp92cz26axbg

Table of Contents