h8s-2111b Renesas Electronics Corporation., h8s-2111b Datasheet - Page 343

no-image

h8s-2111b

Manufacturer Part Number
h8s-2111b
Description
Renesas 16-bit Single-chip Microcomputer H8s Family / H8s/2100 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
13.4.2
Initialize the IIC by the procedure shown in figure 13.6 before starting transmission/reception of
data.
Note: Be sure to modify ICMR after transmit/receive operation has been completed. If ICMR is
13.4.3
In I
data, and the slave device returns an acknowledge signal.
Figure 13.7 shows the sample flowchart for the operations in master transmit mode.
2
C bus format master transmit mode, the master device outputs the transmit clock and transmit
modified during transmit/receive operation, bit counter BC2 to BC0 will be modified
erroneously, thus causing incorrect operation.
<< Start transmit/receive operation >>
Initialization
Master Transmit Operation
Set MSTP4 = 0 (IIC_0)
Set IICE = 1 in STCR
Set ICE = 0 in ICCR
Set ICE = 1 in ICCR
Set SAR and SARX
MSTP3 = 0 (IIC_1)
Start initialization
(MSTPCRL)
Set STCR
Set ICMR
Set ICCR
Set ICSR
Set ICXR
Figure 13.6 Sample Flowchart for IIC Initialization
Cancel module stop mode
Enable the CPU accessing to the IIC control register and data register
Enable SAR and SARX to be accessed
Set the first and second slave addresses and IIC communication format
(SVA6 to SVA0, FS, SVAX6 to SVAX0, and FSX)
Enable ICMR and ICDR to be accessed
Use SCL/SDA pin as an IIC port
Set acknowledge bit (ACKB)
Set transfer rate (IICX)
Set communication format, wait insertion, and transfer rate
(MLS, WAIT, CKS2 to CKS0)
Enable interrupt
(STOPIM, HNDS, ALIE, ALSL, FNC1, and FNC0)
Set interrupt enable, transfer mode, and acknowledge decision
(IEIC, MST, TRS, and ACKE)
Rev. 1.00, 05/04, page 309 of 544

Related parts for h8s-2111b