![](http://datasheet.mmic.net.cn/30000/M38197MA-XXXKP_datasheet_2360287/M38197MA-XXXKP_114.png)
100
2. APPLICATION
MITSUBISHI MICROCOMPUTER
3819 Group
2.3 Serial I/O
3819 Group USER’S MANUAL
Control procedure : In this example, a serial communication is performed at the beginning of the main routine
which loops in a certain cycle.
Fig. 2.3.22 Control procedure [Data transmission or reception using automatic transfer]
Initialize the serial I/O 1
Set the related functions for using automatic
transfer.
Generate the timing of a certain cycle by
using the timer or other functions.
Control so that the main routine is executed
in a certain cycle.
Set one block (8 byte) of transmission data
in the RAM.
Set the data pointer (set “8 byte – 1”).
Start the automatic transfer.
It is possible to execute the other process-
ing during an automatic transfer.
(a part of the main processing is executed.)
Check the completion of an automatic
transfer.
Transfer a data stored to the Serial I/O
automatic
transfer
RAM
to
RAM
for
processing of reception data.
Perform the following processing in the main
processing.
RESET
Initialization
SIO1CON
SIOAC
SIOAI
SIODP
ICON1
...
(Address:1916)
(Address:1A16)
(Address:1C16)
(Address:1816)
(Address:3E16), bit3
010010102
000000012
30
8 – 1
0
SIODP (Address:18 16)
7
SIOAC (Address:1A 16), bit 1
1
SIOAC (Address:1A 16), bit1?
0
N
Has the time specified for the cycle
control of a main routine elapsed?
Y
Serial I/O automatic transfer RAM
(Address:0F0016 to 0F0716)
a transmission
data
Serial I/O automatic
transfer RAM
(Address:0F0016 to 0F0716)
RAM for processing
of a reception data
Main processing
1. The processing of the data transferred into
the RAM for processing of reception data.
2. The preparation of the next transmission
data.
q