Fig. 5.5.6 Flowchart Of Data Output Processing Routine - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

APPLICATION
5.5 Example of I
2
(3) Data output processing routine
The data output, the START condition, the STOP condition, and the bus H processing routines are
the common routines within the transmit/receive processing routine.

Fig. 5.5.6 Flowchart of data output processing routine

5-30
C-BUS control by software (M37220M3-XXXSP/FP)
Data output
Bit 0 of port P2 direction register
"BIT COUNTER" = "0"
Rotate "WRITEDATA" left
with Carry flag
Carry flag = "1"?
P2
P2
(SCL) = "1"
1
Wait 6 µs
P2
(SCL) = "0"
1
"BIT COUNTER"
←"BIT COUNTER" + 1
No
"BIT COUNTER"
Yes
Bit 0 of port P2 direction register
Wait 6 µs
P2
(SCL) = "1"
1
Wait 6 µs
P2
Yes
F_ACK = "1"
P2
7220 Group User's Manual
= "output mode"
No
Yes
(SDA) = "1"
0
≥ "8"?
= "input mode
No
(SDA) = "1"?
0
(SCL) = "0"
1
RETURN
RAM:
WRITEDATA
BIT COUNTER
Flag:
F_ACK
P2
(SDA) = "0"
0
F_ACK = "0"

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents