Enabling 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 (A8H), EICON (D8H), and EIE (E8H) 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

AFH

Global interrupt enable/disable

6

ES1

AEH

Enable Serial Port 1 interrupt

5

ET2

ADH

Enable Timer 2 interrupt

4

ES

ACH

Enable Serial Port 0 interrupt

3

ET1

ABH

Enable Timer 1 interrupt

2

EX1

AAH

Enable external interrupt 1

1

ET0

A9H

Enable Timer 0 interrupt

0

EX0

A8H

Enable external interrupt 0

Table 10−3.EICON (D8 H ) SFR

Bit

Name

Bit Address

Explanation of Function

 

 

 

 

7

SMOD1

DFH

Serial Port 1 double baud rate

6

DEH

Undefined (set to 1)

5

EAI

DDH

Enable auxiliary interrupt

4

AI

DCH

Auxiliary interrupt flag

3

WDTI

DBH

Watchdog interrupt flag

2

DAH

Undefined (cleared to 0)

1

D9H

Undefined (cleared to 0)

0

D8H

Undefined (cleared to 0)

Table 10−4.EIE (E8 H ) SFR

Bit

Name

Bit Address

Explanation of Function

 

 

 

 

7

EFH

Undefined (set to 1)

6

EEH

Undefined (set to 1)

5

EDH

Undefined (set to 1)

4

EWDI

ECH

Enable Watchdog interrupt

3

EX5

EBH

Enable external interrupt 5

2

EX4

EAH

Enable external interrupt 4

1

EX3

E9H

Enable external interrupt 3

0

EX2

E8H

Enable external interrupt 2

Interrupts 10-5

Page 111
Image 111
Texas Instruments MSC1210 manual Enabling Interrupts, 2.IE A8 H SFR, 3.EICON D8 H SFR, 4.EIE E8 H SFR