Datasheet

58
AT89C51IC2
4301D–8051–02/08
Interrupt System The AT89C51IC2 has a total of 10 interrupt vectors: two external interrupts (INT0 and
INT1), three timer interrupts (timers 0, 1 and 2), the serial port interrupt, SPI interrupt,
Two Wire Interface (I2C) interrupt, Keyboard interrupt and the PCA global interrupt.
These interrupts are shown in Figure 22.
Figure 22. Interrupt Control System
Each of the interrupt sources can be individually enabled or disabled by setting or clear-
ing a bit in the Interrupt Enable register (Table 51 and Table 49). This register also
contains a global disable bit, which must be cleared to disable all interrupts at once.
Each interrupt source can also be individually programmed to one out of four priority lev-
els by setting or clearing a bit in the Interrupt Priority register (Table 52) and in the
Interrupt Priority High register (Table 50 and Table 51) shows the bit values and priority
levels associated with each combination.
IE1
0
3
High priority
interrupt
Interrupt
polling
sequence, decreasing from
high to low priority
Low priority
interrupt
Global Disable
Individual Enable
EXF2
TF2
TI
RI
TF0
INT0
INT1
TF1
IPH, IPL
IE0
0
3
0
3
0
3
0
3
0
3
0
3
PCA IT
KBD IT
SPI IT
0
3
0
3
0
3
TWI IT