English
Language : 

M38002M4 Datasheet, PDF (95/173 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.3 Serial I/O
Control procedure : Figure 2.3.33 shows a control procedure at a transmitting side, and Figure 2.3.34
shows a control procedure at a receiving side.
RESET
Initialization
q X : This bit is not used in this application.
Set it to “0” or “1.” It’s value can be disregarded.
SIOCON (Address : 1A16)
1001X0012
UARTCON (Address : 1B16)
BRG
(Address : 1C16)
000010002
8–1
P4
(Address : 0816), bit0 0
P4D
(Address : 0916) XXXXXXX12
q Set port P40 for a communication control.
Pass 10 ms?
Y
P4 (Address : 0816), bit0 1
N
q An interval of 10 ms is generated by a timer.
q Start of communication.
TB/RB (Address : 1816)
The first byte of a
transmission data
q Write a transmission data
The Transmit buffer empty flag is set to “0”
by this writing.
0
SIOSTS (Address : 1916), bit0?
1
TB/RB (A( ddress : 1816)
The second byte of
a transmission data
q Check to be transferred data from the Transmit
buffer register to the Transmit shift register.
(Transmit buffer empty flag)
q Write a transmission data
The Transmit buffer empty flag is set to “0”
by this writing.
0
q Check to be transferred data from the Transmit
SIOSTS (Address : 1916), bit0?
buffer register to the Transmit shift register.
(Transmit buffer empty flag)
1
SIOSTS (Address : 1916), bit2?
0
q Check a shift completion of the Transmit shift register.
(Transmit shift register shift completion flag)
1
P4 (Address : 0816), bit0 0
q End of communication
Fig. 2.3.33 Control procedure at a transmitting side [Communication using UART]
3800 GROUP USER’S MANUAL
2-47