HT46R01/HT46R02/HT46R03
Interrupts
Interrupts are an important part of any microcontroller
system. When an external event or an internal function
such as a Timer/Event Counter or an A/D converter re-
quires microcontroller attention, their corresponding in-
terrupt will enforce a temporary suspension of the main
program allowing the microcontroller to direct attention
to their respective needs. Each device contains a single
external interrupt and several internal interrupts func-
tions. The external interrupt is controlled by the action of
the external INT pin, while the internal interrupts are
controlled by the Timer/Event Counter overflows and
the A/D converter interrupt.
Interrupt Register
Overall interrupt control, which means interrupt enabling
and request flag setting, is controlled by a single INTC0
register or dual INTC0 and INTC1 registers, which are
located in the Data Memory. By controlling the appropri-
ate enable bits in these registers each individual inter-
rupt can be enabled or disabled. Also when an interrupt
occurs, the corresponding request flag will be set by the
microcontroller. The global enable flag if cleared to zero
will disable all interrupts.
b
7
b
0
A
D
F
T
0
F
E
I
F
E
A
D
I
E
T
0
I
E
E
I
E
M
I
I
N
T
C
0
R
e
g
i
s
t
e
r
H
T
4
6
R
0
1
M
a
s
t
e
r
I
n
t
e
r
r
u
p
t
G
l
o
b
a
l
E
n
a
b
l
e
1
0
:
:
g
g
l
l
o
o
b
b
a
a
l
l
e
n
a
b
l
e
d
i
s
a
b
l
e
E
x
t
e
r
n
a
l
I
n
t
e
r
r
u
p
t
E
n
a
b
l
e
1
0
:
:
e
d
n
i
a
b
l
e
s
a
b
l
v
e
T
1
i
m
e
n
i
r
a
/
E
e
n
t
C
o
u
n
t
e
r
I
n
t
e
r
r
u
p
t
E
n
a
b
l
e
:
:
e
d
b
l
e
0
s
a
b
l
e
A
1
0
/
D
C
o
n
v
e
r
t
e
r
I
n
t
e
r
r
u
p
t
E
n
a
b
l
e
:
:
e
d
n
i
a
b
l
e
s
a
b
l
e
E
1
x
t
e
r
n
a
l
I
n
t
e
r
r
u
p
t
R
e
q
u
e
s
t
F
l
a
g
:
:
a
i
c
t
i
c
v
e
0
n
a
t
i
v
e
T
i
m
e
c
r
/
E
v
e
n
t
C
o
u
n
t
e
r
I
n
t
e
r
r
u
p
t
R
e
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