Technical information
APPLICATION
2.3 Serial I/O
2-41
3800 GROUP USER’S MANUAL
Control procedure :
Control in the master unit
After a setting of the related registers is completed as shown in Figure 2.3.33, in the master unit
transmission or reception of 1-byte data is started simply by writing transmission data to the
Transmit buffer register.
To perform the communication in the timing shown in Figure 2.3.25, therefore, take the timing into
account and write transmission data. Read out the reception data when the Serial I/O transmit
interrupt request bit is set to “1,” or before the next transmission data is written to the Transmit
buffer register.
A processing example in the master unit using timer interrupts is shown below.
Fig. 2.3.27 Control in the master unit
Write a transmission data
Read a reception data
N
Within a block transfer period?
Y
Y
Complete to transfer a block?
N
RTI
Write the first transmission data
(first byte) in a block
Count a block interval counter
N
Start a block transfer?
Y
Generate a certain block interval by
using a timer or other functions.
●
Check the block interval counter and
determine to start of a block transfer.
●
CLT (Note 1)
CLD (Note 2)
Push register to stack
Note 1: When using the Index X mode flag (T).
Note 2: When using the Decimal mode flag (D).
Push the register used in the interrupt
processing routine into the stack.
●
Pop registers Pop registers which is pushed to stack.
●
Interrupt processing routine
executed every 488 µs