Fig. 5.5.5 Flowchart Of Read Processing Routine - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

5.5 Example of I
(2) Read processing routine
Slave address
S
(W) "A0
"NO ACK COUNTER"
←"NO ACK COUNTER" + 1
No (try 3 times)

Fig. 5.5.5 Flowchart of read processing routine

2
C-BUS control by software (M37220M3-XXXSP/FP)
A
A
R
C
Sub-address
C
"
16
S
K
K
No (to other devices (cf. E
"WRITEDATA"
"NO ACK COUNTER" = "0"
No (no ACK)
No (no ACK)
"WRITEDATA"
No (no ACK)
STOP condition
Yes (end)
"NO ACK COUNTER"
≥ "3"?
Yes (give up)
7220 Group User's Manual
(See note 1)
A
N
Slave address
A
C
Data
P
C
(R) "A1
"
16
K
K
Read start
To M52340SP ?
(See note 2)
2
Yes (sub-address is not necessary at reading)
PROM))
←Slave address (W) "A0
"
16
START condition
Data output
"F_ACK" = "0"?
Yes (ACK)
"WRITEDATA" ←Sub-address
Data output
"F_ACK" = "0"?
Yes (ACK)
START condition
←Slave address (R) "A1
"
16
Data output
"F_ACK" = "0"?
Yes (ACK)
Data input
"READ DATA
No (not yet)
COUNTER" = "0"?
Return NACK
STOP condition
Bus H
End
APPLICATION
RAM:
WRITEDATA
NO ACK COUNTER
READ DATA COUNTER
Flag:
F_ACK
Notes 1: NACK = No ACK
2:
Branches according to whether the
device needs sub-address or not.
Return ACK
"READ DATA COUNTER"
←"READ DATA COUNTER" – 1
5-29

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents