2-36
3802 GROUP USER’S MANUAL
APPLICATION
2.3 Serial I/O
Control procedure :
Figure 2.3.21 shows a control procedure at a transmitting side, and Figure
2.3.22 shows a control procedure at a receiving side.
Fig. 2.3.21 Control procedure at a transmitting side [Communication using a clock synchronous
serial I/O]
RESET
Initialization
.
(Address : 1A
16
)
(Address : 1C
16
)
(Address : 3A
16
), bit0
SIO1CON
BRG
INTEDGE
8—1
0
TB/RB (Address : 18
16
)
The first byte of a
transmission data
Write a transmission data
The Transmit buffer empty flag is set to “0”
by this writing.
Detect INT
0
falling edge
IREQ1 (Address:3C
16
), bit0
1
0
Check to be transfered data from the Transmit
buffer register to the Transmit shift register.
(Transmit buffer empty flag)
SIO1STS (Address : 19
16
), bit0
1
0
TB/RB (Address : 18
16
)
Write a transmission data
The transmit buffer empty flag is set to “0”
by this writing.
The second byte of a
transmission data
Check to be transfered data from the Transmit
buffer register to the Transmit shift register.
(Transmit buffer empty flag)
SIO1STS (Address : 19
16
), bit0
1
0
Check a shift completion of the Transmit shift register
(Transmit shift register shift completion flag)
SIO1STS (Address : 19
16
), bit2
1
0
IREQ1 (Address : 3C
16
), bit0
0
X
: This bit is not used in this application.
Set it to “0” or “1.” It’s value can be disregarded.
G
1101
XX
00
2