Download Print this page

Hitachi H8S/2633 Hardware Manual page 749

Advertisement

Start
Initialize
Read BBSY in ICCR
No
BBSY = 0?
Yes
Set MST = 1 and
TRS = 1 in ICCR
Write BBSY = 1
and SCP = 0 in ICCR
No
IRIC = 1?
Yes
Write transmit data in ICDR
Clear IRIC in ICCR
Read IRIC in ICCR
No
IRIC = 1?
Yes
Read ACKB in ICSR
ACKB = 0?
Yes
Transmit mode?
Yes
Write transmit data in ICDR
Clear IRIC in ICCR
Read IRIC in ICCR
No
IRIC = 1?
Yes
Read ACKB in ICSR
No
End of transmission
(ACKB = 1)?
Yes
Write BBSY = 0
and SCP = 0 in ICSR
End
Figure 18-14 Flowchart for Master Transmit Mode (Example)
[1] Test the status of the SCL and SDA lines.
[1]
[2] Select master transmit mode.
[3] Generate a start condition.
[4] Set transmit data for the first byte (slave address + R/W).
[5] Wait for 1 byte to be transmitted.
[2]
[6] Test for acknowledgement by the designated slave
device.
[3]
[7] Set transmit data for the second and subsequent bytes.
[8] Wait for 1 byte to be transmitted.
[9] Test for end of transfer.
[10] Generate a stop condition.
[4]
[5]
[6]
No
No
Master receive mode
[7]
[8]
[9]
[10]
731

Advertisement

loading

This manual is also suitable for:

Hd6432633Hd6432631Hd64f2633H8s/2632Hd6432632H8s/2631