Serial port provides interrupts for 8031µC
N Kannan, Mediatronix Ltd, Trivandrum, India -- EDN, 12/9/1999

You can use the RxD pin of an 8031 µC for external interrupts (
Figure 1). You program the serial port to receive in Mode 2 with a baud rate either 1/32 or 1/64 of the oscillator frequency, depending on the SMOD bit in the PCON register. In serial mode, the start bit should be a zero, and the stop bit should be a one for a valid reception. The µC generates the interrupt upon reception of a low start bit, nine data bits, and a high stop bit; the interrupt occurs at the end of reception. The one-shot multivibrator in
Figure 1 provides a
low pulse (the start bit) to the RxD input with a width greater than one bit
period; for example, four periods. The bit period depends on the baud rate.
Whenever an external signal edge-triggers the one-shot, the 8031 enters
serial-reception mode and generates an interrupt after 10 bit periods. The only
disadvantage of the method is that at least 10 bit periods should occur between
interrupts. Also, you should use the µC's ISR pin to reinitialize the controller
for the next interrupt. If you can't guarantee the minimum period between
interrupts, then you can use a dual 74LS221 one-shot multivibrator. You can use
the rising edge at

to trigger
a second one-shot and then use the output of the second to clear the first
one-shot. This action forces

to a high state for five to six bit periods to ensure a high stop bit. (DI #2441)