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
Содержание 8XC251SA
Страница 2: ......
Страница 3: ...May 1996 8XC251SA 8XC251SB 8XC251SP 8XC251SQ Embedded Microcontroller User s Manual...
Страница 18: ......
Страница 19: ...1 Guide to This Manual...
Страница 20: ......
Страница 30: ......
Страница 31: ...2 Architectural Overview...
Страница 32: ......
Страница 41: ...3 Address Spaces...
Страница 42: ......
Страница 63: ...4 Device Configuration...
Страница 64: ......
Страница 81: ...5 Programming...
Страница 82: ......
Страница 102: ......
Страница 103: ...6 Interrupt System...
Страница 104: ......
Страница 120: ......
Страница 121: ...7 Input Output Ports...
Страница 122: ......
Страница 132: ......
Страница 133: ...8 Timer Counters and Watchdog Timer...
Страница 134: ......
Страница 153: ...9 Programmable Counter Array...
Страница 154: ......
Страница 170: ......
Страница 171: ...10 Serial I O Port...
Страница 172: ......
Страница 187: ...11 Minimum Hardware Setup...
Страница 188: ......
Страница 197: ...12 Special Operating Modes...
Страница 198: ......
Страница 206: ......
Страница 207: ...13 External Memory Interface...
Страница 208: ......
Страница 239: ...14 Programming and Verifying Nonvolatile Memory...
Страница 240: ......
Страница 250: ......
Страница 251: ...A Instruction Set Reference...
Страница 252: ......
Страница 390: ......
Страница 391: ...B Signal Descriptions...
Страница 392: ......
Страница 400: ......
Страница 401: ...C Registers...
Страница 402: ......
Страница 436: ......
Страница 437: ...Glossary...
Страница 438: ......
Страница 446: ......
Страница 447: ...Index...
Страница 448: ......
Страница 458: ......