The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN
HANEL

SERIAL COMMUNI-CATION INTERRUPT


RI and TI Flags and Interrupts


‰In the 8051 there is only one interrupt set aside for serial communication


¾This interrupt is used to both send and receive data¾If the interrupt bit in the IE register (IE.4) is enabled, when RI or TI is raised the 8051 gets interrupted and jumps to memory location 0023H to execute the ISR¾In that ISR we must examine the TI and RI flags to see which one caused the interrupt and respond accordingly Serial interrupt is invoked


by TI or RI flags

TI RI

0023H
Free download pdf