Rev. 1.00, 05/04, page 317 of 544
Receive Operation Using the Wait Function:
Figures 13.13 and 13.14 show the sample flowcharts for the operations in master receive mode
(WAIT = 1).
Set TRS = 0 in ICCR
Set ACKB = 0 in ICSR
Set WAIT = 1 in ICMR
Yes
Yes
Yes
Clear IRIC flag in ICCR
Clear IRIC flag in ICCR
Read IRIC flag in ICCR
Is next
receive the last one?
Last receive?
IRIC = 1?
IRTR = 1?
Yes
IRTR=1?
No
No
No
No
Read IRIC flag in ICCR
IRIC=1?
No
Yes
Read ICDR
[4] Determine end of reception
[13] Determine end of reception
[1] Select receive mode.
[2] Start receiving. The first read
is a dummy read.
[3] Wait for a receive wait
(Set IRIC at the fall of the 8th clock) or,
Wait for 1 byte to be received
(Set IRIC at the rise of the 9th clock)
[12] Wait for a receive wait
(Set IRIC at the fall of the 8th clock) or,
Wait for 1 byte to be received
(Set IRIC at the rise of the 9th clock)
[5] Read the receive data.
[6] Clear IRIC flag.
(to end the wait insertion)
[15] Clear wait mode.
Clear IRIC flag.
( IRIC flag should be cleared to 0
after setting WAIT = 0.)
[17] Generate stop condition
Master receive mode
[14] Clear IRIC.
(to end the wait insertion)
[16] Read the last receive data.
[7] Set acknowledge data for the last reception.
[8] Wait for TRS setting
[9] Set TRS for stop condition issuance
[10] Read the receive data.
[11] Clear IRIC flag. (to end the wait insertion)
Read ICDR
Clear IRIC flag in ICCR
Set HNDS = 0 in ICXR
Wait for one clock pulse
Set ACKB = 1 in ICSR
Set TRS = 1 in ICCR
End
Set WAIT = 0 in ICMR
Set BBSY= 0 and SCP= 0
in ICCR
Clear IRIC flag in ICCR
Read ICDR
Clear IRIC flag in ICCR
Read ICDR
Figure 13.13 Sample Flowchart for Operations in Master Receive Mode
(receiving multiple bytes) (WAIT = 1)
Содержание H8S/2111B
Страница 2: ...Rev 1 00 05 04 page ii of xxxiv...
Страница 8: ...Rev 1 00 05 04 page viii of xxxiv...
Страница 22: ...Rev 1 00 05 04 page xxii of xxxiv...
Страница 30: ...Rev 1 00 05 04 page xxx of xxxiv...
Страница 84: ...Rev 1 00 05 04 page 50 of 544...
Страница 100: ...Rev 1 00 05 04 page 66 of 544...
Страница 126: ...Rev 1 00 05 04 page 92 of 544...
Страница 180: ...Rev 1 00 05 04 page 146 of 544...
Страница 216: ...Rev 1 00 05 04 page 182 of 544...
Страница 254: ...Rev 1 00 05 04 page 220 of 544...
Страница 268: ...Rev 1 00 05 04 page 234 of 544...
Страница 382: ...Rev 1 00 05 04 page 348 of 544...
Страница 462: ...Rev 1 00 05 04 page 428 of 544...
Страница 464: ...Rev 1 00 05 04 page 430 of 544...
Страница 488: ...Rev 1 00 05 04 page 454 of 544...
Страница 496: ...Rev 1 00 05 04 page 462 of 544...
Страница 574: ...Rev 1 00 05 04 page 540 of 544...
Страница 581: ......
Страница 582: ...H8S 2111B Hardware Manual...