Rev. 1.00, 09/03, page 492 of 704
[Legend]
S:
Start condition. The master device drives SDA from high to low while SCL is high.
SLA: Slave address
R/
W
: Indicates the direction of data transfer: from the slave device to the master device when
R/
W
is 1, or from the master device to the slave device when R/
W
is 0.
A:
Acknowledge. The receive device drives SDA to low.
DATA: Transfer data
P:
Stop condition. The master device drives SDA from low to high while SCL is high.
17.4.2
Master Transmit Operation
In master transmit mode, the master device outputs the transmit clock and transmit data, and the
slave device returns an acknowledge signal. The operation timings in master transmit mode are
shown in figures 17.5 and 17.6. The transmission procedure and operations in master transmit
mode are described below.
1. Set the ICE bit in ICCRA to 1. Set the WAIT bit in ICMR and the CKS3 to CKS0 bits in
ICCRA to 1 (initial setting).
2. Read the BBSY flag in ICCRB to confirm that the bus is free. Set the MST and TRS bits in
ICCRA to select master transmit mode. Then, write 1 to BBSY and 0 to SCP using the MOV
instruction. (Start condition issued) This generates the start condition.
3. After confirming that TDRE in ICSR has been set, write the transmit data (the first-byte data
show the slave address and R/
W
) to ICDRT. At this time, TDRE is automatically cleared to 0,
then data is transferred from ICDRT to ICDRS. TDRE is set again.
4. When transmission of one byte data is completed while TDRE is 1, TEND in ICSR is set to 1
at the rise of the 9th transmit clock pulse. Read the ACKBR bit in ICIER, and confirm that the
slave device has been selected. Then, write second byte data to ICDRT. When ACKBR is 1,
the slave device has not been acknowledged, so issue the stop condition. To issue the stop
condition, write 0 to BBSY and SCP using the MOV instruction. SCL is fixed low until the
transmit data is prepared or the stop condition is issued.
5. The transmit data after the second byte is written to ICDRT every time TDRE is set.
6. Write the number of bytes to be transmitted to ICDRT. Wait until TEND is set (the end of last
byte data transmission) while TDRE is 1, or wait for NACK (NACKF in ICSR = 1) from the
receive device while ACKE in ICIER is 1. Then, issue the stop condition to clear TEND or
NACKF.
7. When the STOP bit in ICSR is set to 1, the operation returns to slave receive mode.
Содержание H8S/2437
Страница 2: ...Rev 1 00 09 03 page ii of xxxviii ...
Страница 8: ...Rev 1 00 09 03 page viii of xxxviii ...
Страница 32: ...Rev 1 00 09 03 page xxxii of xxxviii ...
Страница 38: ...Rev 1 00 09 03 page xxxviii of xxxviii ...
Страница 168: ...Rev 1 00 09 03 page 130 of 704 ...
Страница 336: ...Rev 1 00 09 03 page 298 of 704 ...
Страница 402: ...Rev 1 00 09 03 page 364 of 704 ...
Страница 454: ...Rev 1 00 09 03 page 416 of 704 ...
Страница 512: ...Rev 1 00 09 03 page 474 of 704 ...
Страница 562: ...Rev 1 00 09 03 page 524 of 704 ...
Страница 648: ...Rev 1 00 09 03 page 610 of 704 ...
Страница 672: ...Rev 1 00 09 03 page 634 of 704 ...
Страница 732: ...Rev 1 00 09 03 page 694 of 704 ...
Страница 742: ...Rev 1 00 09 03 page 704 of 704 ...
Страница 745: ......
Страница 746: ...H8S 2437 Group Hardware Manual REJ09B0059 0100Z ...