S1C8F626 TECHNICAL MANUAL
EPSON
67
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Serial Interface)
5.7.9 Interrupt function
This serial interface includes a function that
generates the below indicated three types of
interrupts.
Transmitting complete interrupt
Receiving complete interrupt
Error interrupt
The interrupt factor flag FSxxx and the interrupt
enable register ESxxx for the respective interrupt
factors are provided and then the interrupt enable/
disable can be selected by the software. In addition,
a priority level of the serial interface interrupt for
the CPU can be optionally set at levels 0 to 3 by the
interrupt priority registers PSIFx0 and PSIFx1.
For details on the above mentioned interrupt
control register and the operation following
generation of an interrupt, see "5.14 Interrupt and
Standby Status".
Figure 5.7.9.1 shows the configuration of the serial
interface interrupt circuit.
■ Transmitting complete interrupt
This interrupt factor is generated at the point where
the sending of the data written into the shift
register has been completed and sets the interrupt
factor flag FSTRAx to "1". When set in this manner,
if the corresponding interrupt enable register
ESTRAx is set to "1" and the corresponding inter-
rupt priority registers PSIFx0 and PSIFx1 are set to
a higher level than the setting of interrupt flags (I0
and I1), an interrupt will be generated to the CPU.
When "0" has been written into the interrupt enable
register ESTRAx and interrupt has been disabled,
an interrupt is not generated to the CPU. Even in
this case, the interrupt factor flag FSTRAx is set to
"1".
The interrupt factor flag FSTRAx is reset to "0" by
writing "1".
The following transmitting data can be set and the
transmitting start (writing "1" to TXTRGx) can be
controlled by generation of this interrupt factor.
The exception processing vector address for each
channel is set as follows:
Ch. 0 transmitting complete interrupt: 00002CH
Ch. 1 transmitting complete interrupt: 000050H
Data
bus
Interrupt
request
Address
Error generation
Interrupt factor
flag
FSERRx
Address
Interrupt enable
register ESERRx
Address
Receive completion
Interrupt factor
flag
FSRECx
Address
Interrupt enable
register ESRECx
Address
Transmit completion
Interrupt factor
flag
FSTRAx
Address
Interrupt enable
register ESTRAx
Interrupt priority
level judgment
circuit
Address
Interrupt priority register
PSIFx0, PSIFx1
Fig. 5.7.9.1 Configuration of serial interface interrupt circuit