3 enabling interrupts – Texas Instruments MSC1210 User Manual
Page 111
Enabling Interrupts
10-5
Interrupts
10.3 Enabling Interrupts
By default, at power-up all interrupts are disabled. This means that even if, for
example, the TF0 bit is set, the MSC1210 will not execute the Timer 0 interrupt.
You must specify in code which interrupts you want the MSC1210 to enable.
You may enable and disable interrupts by modifying the IE (A8
H
), EICON
(D8
H
), and EIE (E8
H
) SFRs, as shown in Table 10−2, Table 10−3, and
Table 10−4.
Table 10−2.IE (A8
H
) SFR
Bit
Name
Bit Address
Explanation of Function
7
EA
AF
H
Global interrupt enable/disable
6
ES1
AE
H
Enable Serial Port 1 interrupt
5
ET2
AD
H
Enable Timer 2 interrupt
4
ES
AC
H
Enable Serial Port 0 interrupt
3
ET1
AB
H
Enable Timer 1 interrupt
2
EX1
AA
H
Enable external interrupt 1
1
ET0
A9
H
Enable Timer 0 interrupt
0
EX0
A8
H
Enable external interrupt 0
Table 10−3.EICON (D8
H
) SFR
Bit
Name
Bit Address
Explanation of Function
7
SMOD1
DF
H
Serial Port 1 double baud rate
6
−
DE
H
Undefined (set to 1)
5
EAI
DD
H
Enable auxiliary interrupt
4
AI
DC
H
Auxiliary interrupt flag
3
WDTI
DB
H
Watchdog interrupt flag
2
−
DA
H
Undefined (cleared to 0)
1
−
D9
H
Undefined (cleared to 0)
0
−
D8
H
Undefined (cleared to 0)
Table 10−4.EIE (E8
H
) SFR
Bit
Name
Bit Address
Explanation of Function
7
−
EF
H
Undefined (set to 1)
6
−
EE
H
Undefined (set to 1)
5
−
ED
H
Undefined (set to 1)
4
EWDI
EC
H
Enable Watchdog interrupt
3
EX5
EB
H
Enable external interrupt 5
2
EX4
EA
H
Enable external interrupt 4
1
EX3
E9
H
Enable external interrupt 3
0
EX2
E8
H
Enable external interrupt 2