English
Language : 

M38B5XMXH Datasheet, PDF (140/355 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.3 Serial I/O
Control procedure: When the registers are set as shown in Figure 2.3.22, the serial I/O1 can transmit
1-byte data by writing data to the serial I/O1 register.
Thus, after setting the CS signal to “L”, write the transmission data to the serial
I/O1 register by each 1 byte; and return the CS signal to “H” when the target
number of bytes has been transmitted.
Figure 2.3.24 shows a control procedure.
RESET
Initialization
SC11 (address 001916)
SC12 (address 001A16)
SC13 (address 001C16)
P6 (address 000C16), bit2
P6D (address 000D16), bit2
SC11 (address 001916), bit4
001000012
00XX00002
011XXXXX2
1
1
1
q X: This bit is not used here. Set it to “0” or “1” arbitrarily.
Serial I/O1 setting
CS signal output level to “H” setting
CS signal output port setting
Enabled serial I/O1
P6 (address 000C16), bit2
0
SIO1 (address 001B16)
Transmission data
CS signal output level to “L” setting
Transmission data write
(Start of 1-byte data transmission)
SIO1CON2 (address 001A16), bit5 ?
0
N
All data have been transmitted ?
Y
P6 (address 000C16), bit2
1
1
Judgment of completion of transmitting 1-byte
data
Use any of RAM area as a counter for counting
the number of transmitted bytes.
Judgment of completion of transmitting the target
number of bytes
Returning CS signal output level to “H” when
transmission of the target number of bytes is
completed
Fig. 2.3.24 Control procedure
2-52
38B5 Group User’s Manual