English
Language : 

7220 Datasheet, PDF (204/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
5.5 Example of I2C-BUS control by software (M37220M3-XXXSP/FP)
(4) START condition processing routine
START condition
P20 (SDA) = “1”
Bit 0 of port P2 direction register
= “output mode”
Wait 6 µs
P21 (SCL) = “1”
P20 (SDA) = “0”
Wait 6 µs
P21 (SCL) = “0”
RETURN
Fig. 5.5.7 Flowchart of START condition processing routine
(5) STOP condition processing routine
STOP condition
Bit 0 of port P2 direction register
= “output mode”
P20 (SDA) = “0”
P21 (SCL) = “1”
Wait 6 µs
P20 (SDA) = “1”
RETURN
Fig. 5.5.8 Flowchart of STOP condition processing routine
(6) Bus H processing routine
Bus H
Bit 0 of port P2 direction register
= “output mode”
P21 (SCL) = “1”
Wait 6 µs
P20 (SDA) = “1”
RETURN
Fig. 5.5.9 Flowchart of bus H processing routine
7220 Group User’s Manual
5-31