Rev. 1.00, 09/03, page 501 of 704
BBSY = 0 ?
No
TEND = 1 ?
No
Yes
Start
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[13]
[14]
[15]
Initialize
Set MST = 1 and TRS
= 1 in ICCRA
Write BBSY = 1
and SCP = 0
Write transmit data
to ICDRT
Write BBSY = 0
and SCP = 0
Set MST = 0 and TRS
= 0 in ICCRA
Read BBSY in ICCRB
Read TEND in ICSR
Read ACKBR in ICIER
Master receive mode
Yes
ACKBR = 0 ?
Write transmit data to ICDRT
Read TDRE in ICSR
Read TEND in ICSR
Clear TEND in ICSR
Read STOP in ICSR
Clear TDRE in ICSR
End
Write transmit data to ICDRT
Transmit
mode?
No
Yes
TDRE = 1 ?
Last byte?
STOP = 1 ?
No
No
No
No
No
Yes
Yes
TEND = 1 ?
Yes
Yes
Yes
[1]
Test the status of the SCL and SDA lines.
[2]
Set master transmit mode.
[3]
Start condition issuance.
[4]
Set transmit data for the first byte (slave a R/W).
[5]
Wait for 1 byte to be transmitted.
[6]
Test the acknowledge bit, transferred from the specified slave device.
[7]
Set transmit data for the second and subsequent data (except for the last byte).
[8]
Wait for ICDRT empty.
[9]
Set transmit data for the last byte.
[10] Wait for the completion of transmission for the last byte.
[11] Clear TEND flag.
[12] Clear STOP flag.
[13] Stop condition issuance.
[14] Wait for the generation of the stop condition.
[15] Set slave receive mode. Clear TDRE.
[12]
Clear STOP in ICSR
Figure 17.14 Sample Flowchart for Master Transmit Mode
Summary of Contents for H8S/2437
Page 2: ...Rev 1 00 09 03 page ii of xxxviii ...
Page 8: ...Rev 1 00 09 03 page viii of xxxviii ...
Page 32: ...Rev 1 00 09 03 page xxxii of xxxviii ...
Page 38: ...Rev 1 00 09 03 page xxxviii of xxxviii ...
Page 168: ...Rev 1 00 09 03 page 130 of 704 ...
Page 336: ...Rev 1 00 09 03 page 298 of 704 ...
Page 402: ...Rev 1 00 09 03 page 364 of 704 ...
Page 454: ...Rev 1 00 09 03 page 416 of 704 ...
Page 512: ...Rev 1 00 09 03 page 474 of 704 ...
Page 562: ...Rev 1 00 09 03 page 524 of 704 ...
Page 648: ...Rev 1 00 09 03 page 610 of 704 ...
Page 672: ...Rev 1 00 09 03 page 634 of 704 ...
Page 732: ...Rev 1 00 09 03 page 694 of 704 ...
Page 742: ...Rev 1 00 09 03 page 704 of 704 ...
Page 745: ......
Page 746: ...H8S 2437 Group Hardware Manual REJ09B0059 0100Z ...