Interrupt 8051
Interrupt 8051
Timer1 Interrupt
•Timer 1 is a 16-bit timer with a counting range of 0 to 65,535.
•It can operate in 16- or 8-bit mode. It employs the TL1 (Timer 1 Low)
and TH1 (Timer 1 High) registers in 8-bit mode and only the TH1
register in 16-bit mode.
Serial Communication Interrupts (UART)
UART (Universal Asynchronous Receiver/Transmitter) is a serial
communication protocol used with 8051 microcontrollers. Data is
sent over a single cable, bit by bit, in serial transmission. In this
sense, "interrupts" refers to the processes that enable the
microcontroller to react quickly to external events.
Addressing UART communication with the 8051's interrupts:
•Initialization of UART- Set the data format, baud rate, and enable
the UART module by configuring the UART registers.
•Interrupt Enable- Depending on the operation you wish to interrupt
for, enable the UART's transmit interrupt (TI) or receive interrupt
(RI).
•ISR (interrupt service routine)- To handle the interrupt, write an
ISR. The ISR in UART communication normally verifies whether the
transmit buffer is ready (TI) or whether data has been received (RI).
Interrupt Vector Table
The addresses of different interrupt service routines
(ISRs) are stored in a table called the Interrupt Vector
Table (IVT) in an 8051 microcontroller. It is a vital aspect
of the interrupt handling mechanism in the
microcontroller.
Every interrupt has a specific place in the IVT, and the
addresses kept there point to the program memory's
associated ISR's start.
By guiding the program flow to the proper place, the IVT
enables the microcontroller to respond to external events