h8s-2635 Renesas Electronics Corporation., h8s-2635 Datasheet - Page 628

no-image

h8s-2635

Manufacturer Part Number
h8s-2635
Description
Renesas 16-bit Single-chip Microcomputer H8s Family/h8s/2600 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
Section 15 I
15.3.2
At startup the following procedure is used to initialize the IIC.
Note: The ICMR register should be written to only after transmit or receive operations have
15.3.3
In I
data, and the slave device returns an acknowledge signal.
Figure 15-7 is a flowchart showing an example of the master transmit mode.
Rev. 6.00 Feb 22, 2005 page 568 of 1484
REJ09B0103-0600
2
C bus format master transmit mode, the master device outputs the transmit clock and transmit
completed.
Writing to the ICMR register while a transmit or receive operation is in progress could
cause an erroneous value to be written to bit counter bits BC2 to BC0. This could result in
improper operation.
Initial Setting
Master Transmit Operation
2
Set MSTP4 = 0 (IIC0)
Transmit/receive start
C Bus Interface [Option] (Only for the H8S/2638, H8S/2639, and H8S/2630)
Set IICE = 1 (SCRX)
Set SAR and SARX
Set ICE = 0 (ICCR)
Set ICE = 1 (ICCR)
MSTP3 = 0 (IIC1)
Start initialization
(MSTPCRB)
Set SCRX
Set IMCR
Set ICCR
Set ICSR
Figure 15-6 Flowchart for IIC Initialization (Example)
Clear module stop
Enable CPU access by IIC control register and data register
Enable SAR and SARX access
Set transfer format for 1st slave address, 2nd slave address,
and IIC (SVA8−SVA0, FS, SVAX6−SVAX0, FSX)
Enable IMCR and IMDR access. Use SCL and SDA pins is IIC
port
Set acknowledge bit (ACKB)
Set transfer rate (IICX)
Set transfer format, wait insertion, and transfer rate (MLS,
WAIT, CKS2−CKS0)
Set interrupt enable, transfer mode, and acknowledge
judgment (IEIC, MST, TRS, ACKE)

Related parts for h8s-2635