欢迎访问ic37.com |
会员登录 免费注册
发布采购

HT46R065B_12 参数 Datasheet PDF下载

HT46R065B_12图片预览
型号: HT46R065B_12
PDF下载: 下载PDF文件 查看货源
内容描述: 增强A / D型8位OTP MCU [Enhanced A/D Type 8-Bit OTP MCU]
分类和应用:
文件页数/大小: 98 页 / 636 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HT46R065B_12的Datasheet PDF文件第55页浏览型号HT46R065B_12的Datasheet PDF文件第56页浏览型号HT46R065B_12的Datasheet PDF文件第57页浏览型号HT46R065B_12的Datasheet PDF文件第58页浏览型号HT46R065B_12的Datasheet PDF文件第60页浏览型号HT46R065B_12的Datasheet PDF文件第61页浏览型号HT46R065B_12的Datasheet PDF文件第62页浏览型号HT46R065B_12的Datasheet PDF文件第63页  
HT46R064B/065B/066B  
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 Time Base requires  
microcontroller attention, their corresponding interrupt  
will enforce a temporary suspension of the main pro-  
gram allowing the microcontroller to direct attention to  
their respective needs.  
Counter will then be loaded with a new address which  
will be the value of the corresponding interrupt vector.  
The microcontroller will then fetch its next instruction  
from this interrupt vector. The instruction at this vector  
will usually be a JMP statement which will jump to an-  
other section of program which is known as the interrupt  
service routine. Here is located the code to control the  
appropriate interrupt. The interrupt service routine must  
be terminated with a RETI instruction, which retrieves  
the original Program Counter address from the stack  
and allows the microcontroller to continue with normal  
execution at the point where the interrupt occurred.  
The devices contain a single external interrupt and mul-  
tiple internal interrupts. The external interrupt is con-  
trolled by the action of the external interrupt pin, while  
the internal interrupt is controlled by the Timer/Event  
Counters and Time Base overflows.  
The various interrupt enable bits, together with their as-  
sociated request flags, are shown in the following dia-  
gram with their order of priority.  
Interrupt Register  
Overall interrupt control, which means interrupt enabling  
and request flag setting, is controlled by using two regis-  
ters, INTC0 and INTC1. By controlling the appropriate  
enable bits in this registers each individual interrupt 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.  
Once an interrupt subroutine is serviced, all the other in-  
terrupts will be blocked, as the EMI bit will be cleared au-  
tomatically. This will prevent any further interrupt nesting  
from occurring. However, if other interrupt requests oc-  
cur during this interval, although the interrupt will not be  
immediately serviced, the request flag will still be re-  
corded. If an interrupt requires immediate servicing  
while the program is already in another interrupt service  
routine, the EMI bit should be set after entering the rou-  
tine, to allow interrupt nesting. If the stack is full, the in-  
terrupt request will not be acknowledged, even if the  
related interrupt is enabled, until the Stack Pointer is  
decremented. If immediate service is desired, the stack  
must be prevented from becoming full.  
Interrupt Operation  
A Timer/Event Counter overflow, a Time Base event or  
an active edge on the external interrupt pin will all gener-  
ate an interrupt request by setting their corresponding  
request flag, if their appropriate interrupt enable bit is  
set. When this happens, the Program Counter, which  
stores the address of the next instruction to be exe-  
cuted, will be transferred onto the stack. The Program  
A
u
t
o
m
a
t
i
c
a
l
l
y
D
i
s
a
b
l
e
d
w
h
A
u
t
o
m
a
t
i
c
a
l
l
y
e
C
v
l
e
e
n
a
t
r
e
i
d
s
b
s
m
y
e
a
r
I
n
v
S
i
u
R
c
a
e
l
d
l
y
E
o
n
r
a
b
l
e
d
M
a
n
u
a
l
l
y
S
e
t
o
r
a
C
u
l
t
e
o
a
m
r
a
e
t
d
i
c
b
a
y
l
l
S
y
o
w
f
t
i
w
t
h
a
r
R
e
E
T
I
i
P
r
i
o
r
i
t
y
H
i
g
h
E
x
t
e
r
n
a
l
I
n
t
e
r
r
u
p
t
E M  
I
T
T
N
T
E
I
R
e
q
u
e
s
t
F
l
a
g
I
N
T
F
T
i
m
e
r
/
E
v
e
n
t
C
o
u
n
t
e
r
0
0
1
2
E
E
E
E
M
I
I
n
t
e
r
r
u
p
t
R
e
q
u
e
s
t
F
l
a
g
T
0
F
T
i
m
e
r
/
E
v
e
n
t
t
C
C
o
o
u
u
n
n
t
t
e
e
r
r
1
2
E
M
I
I
n
t
e
r
r
u
p
t
R
e
e
q
u
u
e
e
s
s
t
t
F
F
l
l
a
a
g
g
T
T
1
2
F
F
I
n
t
e
r
r
u
p
t
P
o
l
l
i
n
g
T
i
m
e
r
/
E
v
e
n
E
M
I
T
A
I
n
t
e
r
r
u
p
t
R
q
D
E
n
A
/
D
C
o
n
v
e
r
s
i
o
E
M
I
I
n
t
e
r
r
u
p
t
R
e
q
u
e
s
t
F
l
a
g
A
D
F
T
B
E
T
i
m
e
B
a
s
e
E
M
I
L o  
F
w
I
n
t
e
r
r
u
p
t
R
e
q
u
e
s
t
F
l
a
g
T
B
Interrupt Scheme  
Rev. 1.10  
59  
October 23, 2012