Interrupt System
C513AO
User’s Manual
7-7
05.99
Interrupt of the serial interface is generated by the request flags RI and TI in SFR SCON. The
two request flags of the serial interface are logically OR-ed together. Neither of these flags is
cleared by hardware when the service routine is vectored to. In fact, the service routine of each
interface will normally need to determine whether it was the receive interrupt flag or the
transmission interrupt flag which generated the interrupt, and the bit will need to be cleared by
software.
Special Function Register SCON (Address 98H)
Reset Value: 00H
Bit
Function
TI
Serial port Transmitter Interrupt flag
TI is set by hardware at the end of the eighth bit time in Mode 0, or at the beginning
of the stop bit in the other modes, in any serial transmission. TI must be cleared
by software.
RI
Serial port Receiver Interrupt flag
RI is set by hardware at the end of the eighth bit time in Mode 0, or halfway through
the stop bit time in the other modes, in any serial reception (exception see SM2).
RI must be cleared by software.
SM0
SM1
SM2
REN
98H
SCON
Bit No.
9F
H
MSB
LSB
TB8
RB8
TI
RI
9E
H
9D
H
9C
H
9B
H
9A
H
99
H
98
H
The shaded bits are not used for interrupt request control.