MB89960 series
CHAPTER 10 8-Bit Serial I/O
179
10
10.4 8-Bit Serial I/O Interrupts
The 8-bit serial I/O has the following two interrupt sources:
Interrupt generated after 8 bits of serial data have been output in serial output
operation.
Interrupt generated after 8 bits of serial data have been input in serial input
operation.
Serial I/O generates the IRQ4 interrupt request.
s Interrupt for Serial Output Operation
After starting transfer in 8-bit serial output operation, the data in the serial data register (SDR) is
output one bit at a time to the SO pin, synchronized with the period of the selected shift clock.
When all 8 bits have been output, the interrupt request flag bit (SMR: SIOF) is set to “1” on the
rising edge of the final shift clock.
An interrupt request to the CPU (IRQ4) is generated at this time if the interrupt request output
enable bit is enabled (SMR: SIOE = “1”).
Always write “0” to the SIOF bit in the interrupt processing routine to clear the interrupt request.
The SIOF bit is set after completing 8 bits of serial output, regardless of the value of the SIOE
bit.
s Interrupt for Serial Input Operation
After starting reception in 8-bit serial input operation, the data input to the SI pin is stored in the
serial data register (SDR) one bit at a time, synchronized with the period of the selected shift
clock. When all 8 bits have been input, the interrupt request flag bit (SMR: SIOF) is set to “1” on
the rising edge of the final shift clock.
An interrupt request to the CPU (IRQ4) is generated at this time if the interrupt request output
enable bit is enabled (SMR: SIOE = “1”).
Always write “0” to the SIOF bit in the interrupt processing routine to clear the interrupt request.
The SIOF bit is set after completing 8 bits of serial input, regardless of the value of the SIOE bit.
Note: The 8-bit serial I/O does not set the interrupt request flag bit (SMR: SIOF = “1”) if serial
transfer is halted (SMR: SST = “0”) at the same time as serial data transfer completes.
This applies to both serial output and serial input operations. Also, an interrupt request is
generated immediately if the SIOF bit is “1” when the SIOE bit is changed from disabled
to enabled (“0”
→ “1”).
s Register and Vector Table for the 8-Bit Serial I/O Interrupts
Reference: See “3.4.2 Interrupt Processing” for details on the operation of interrupts.
Table 10.4
Register and Vector Table for the 8-Bit Serial I/O Interrupt
Interrupt
Interrupt Level Setting Register
Vector Table Address
Register
Setting Bits
Upper
Lower
IRQ4 (8-bit serial I/O)
ILR2 (007DH)
L41 (bit1)
L40 (bit0)
FFF2H
FFF3H