8XC251SA, SB, SP, SQ USER’S MANUAL
6-4
6.2.2
Timer Interrupts
Two timer-interrupt request bits TF0 and TF1 (see TCON register, Figure 8-6 on page 8-8) are set
by timer overflow (the exception is Timer 0 in Mode 3, see Figure 8-4 on page 8-6). When a timer
interrupt is generated, the bit is cleared by an on-chip hardware vector to an interrupt service rou-
tine. Timer interrupts are enabled by bits ET0, ET1, and ET2 in the IE0 register (see Figure 6-2,
Timer 2 interrupts are generated by a logical OR of bits TF2 and EXF2 in register T2CON (see
Figure 8-12 on page 8-17). Neither flag is cleared by a hardware vector to a service routine. In
fact, the interrupt service routine must determine if TF2 or EXF2 generated the interrupt, and then
clear the bit. Timer 2 interrupt is enabled by ET2 in register IE0.
Table 6-3. Interrupt Control Matrix
Interrupt Name
Global
Enable
PCA
Timer
2
Serial
Port
Timer
1
INT1#
Timer
0
INT0#
Bit Name in IE0
Register
EA
EC
ET2
ES
ET1
EX1
ET0
EX0
Interrupt Priority-
Within-Level
(7 = Low Priority,
1 = High Priority)
NA
7
6
5
4
3
2
1
Bit Names in:
IPH0
IPL0
Reserved
Reserved
IPH0.6
IPL0.6
IPH0.5
IPL0.5
IPH0.4
IPL0.4
IPH0.3
IPL0.3
IPH0.2
IPL0.2
IPH0.1
IPL0.1
IPH0.0
IPL0.0
Programmable for
Negative-edge
Triggered or Level-
triggered Detect?
NA
Edge
No
No
No
Yes
No
Yes
Interrupt Request
Flag in CCON,
T2CON, SCON, or
TCON Register
NA
CF,
CCF
x
TF2,
EXF2
RI, TI
TF1
IE1
TF0
IE0
Interrupt Request
Flag Cleared by
Hardware?
No
No
No
No
Yes
Edge
Yes,
Level No
Yes
Edge
Yes,
Level No
ISR Vector Address
NA
FF:
0033H
FF:
002BH
FF:
0023H
FF:
001BH
FF:
0013H
FF:
000BH
FF:
0003H
Summary of Contents for 8XC251SA
Page 2: ......
Page 3: ...May 1996 8XC251SA 8XC251SB 8XC251SP 8XC251SQ Embedded Microcontroller User s Manual...
Page 18: ......
Page 19: ...1 Guide to This Manual...
Page 20: ......
Page 30: ......
Page 31: ...2 Architectural Overview...
Page 32: ......
Page 41: ...3 Address Spaces...
Page 42: ......
Page 63: ...4 Device Configuration...
Page 64: ......
Page 81: ...5 Programming...
Page 82: ......
Page 102: ......
Page 103: ...6 Interrupt System...
Page 104: ......
Page 120: ......
Page 121: ...7 Input Output Ports...
Page 122: ......
Page 132: ......
Page 133: ...8 Timer Counters and Watchdog Timer...
Page 134: ......
Page 153: ...9 Programmable Counter Array...
Page 154: ......
Page 170: ......
Page 171: ...10 Serial I O Port...
Page 172: ......
Page 187: ...11 Minimum Hardware Setup...
Page 188: ......
Page 197: ...12 Special Operating Modes...
Page 198: ......
Page 206: ......
Page 207: ...13 External Memory Interface...
Page 208: ......
Page 239: ...14 Programming and Verifying Nonvolatile Memory...
Page 240: ......
Page 250: ......
Page 251: ...A Instruction Set Reference...
Page 252: ......
Page 390: ......
Page 391: ...B Signal Descriptions...
Page 392: ......
Page 400: ......
Page 401: ...C Registers...
Page 402: ......
Page 436: ......
Page 437: ...Glossary...
Page 438: ......
Page 446: ......
Page 447: ...Index...
Page 448: ......
Page 458: ......