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

HT46R47(18SOP) 参数 Datasheet PDF下载

HT46R47(18SOP)图片预览
型号: HT46R47(18SOP)
PDF下载: 下载PDF文件 查看货源
内容描述: [Microcontroller, 8-Bit, UVPROM, 8MHz, CMOS, PDSO18]
分类和应用: 可编程只读存储器微控制器光电二极管
文件页数/大小: 75 页 / 613 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HT46R47(18SOP)的Datasheet PDF文件第30页浏览型号HT46R47(18SOP)的Datasheet PDF文件第31页浏览型号HT46R47(18SOP)的Datasheet PDF文件第32页浏览型号HT46R47(18SOP)的Datasheet PDF文件第33页浏览型号HT46R47(18SOP)的Datasheet PDF文件第35页浏览型号HT46R47(18SOP)的Datasheet PDF文件第36页浏览型号HT46R47(18SOP)的Datasheet PDF文件第37页浏览型号HT46R47(18SOP)的Datasheet PDF文件第38页  
HT46R46/C46/R47/C47/R48/R49  
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 in this series con-  
tains a single external interrupt and two internal inter-  
rupts functions. The external interrupt is controlled by  
the action of the external INT pin, while the internal inter-  
rupts are controlled by the Timer/Event Counter over-  
flow and the A/D converter interrupt.  
Counter, which stores the address of the next instruction  
to be executed, will be transferred onto the stack. The  
Program Counter will then be loaded with a new ad-  
dress which will be the value of the corresponding inter-  
rupt 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 another 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 statement,  
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.  
Interrupt Register  
Overall interrupt control, which means interrupt enabling  
and request flag setting, is controlled by a single INTC  
register, which is located in Data Memory. By controlling  
the appropriate enable bits in this register each individ-  
ual 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.  
The various interrupt enable bits, together with their as-  
sociated request flags, are shown in the following dia-  
gram with their order of priority.  
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  
Interrupt Operation  
A Timer/Event Counter overflow, an end of A/D conver-  
sion or the external interrupt line being pulled low will all  
generate an interrupt request by setting their corre-  
sponding request flag, if their appropriate interrupt en-  
able bit is set. When this happens, the Program  
b
7
b
0
A
D
F
T
F
E
I
F
E
A
D
I
E
T
I
E
E
I
E
M
I
I
N
T
C
R
e
g
i
s
t
e
r
M
1
0
a
s
t
o
o
e
r
I
n
t
e
r
r
u
p
t
G
l
o
b
a
l
E
n
a
b
l
e
:
:
g
g
l
l
b
b
a
a
l
l
e
n
a
b
l
e
d
i
s
a
b
l
e
E
1
0
x
t
e
r
n
a
l
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
v
e
T
1
0
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
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
0
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
n
a
t
i
v
e
T
1
0
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
q
u
e
s
t
F
l
a
g
:
:
a
i
t
i
c
v
e
n
a
t
i
n
v
e
A
1
0
/
D
C
o
v
v
e
r
t
e
r
R
e
q
u
e
s
t
F
l
a
g
:
:
a
i
c
t
i
c
e
n
a
t
i
v
e
F
M
r
o
r
t
e
s
t
m
o
d
e
u
s
e
o
n
l
y
.
u
s
u
t
b
e
w
r
i
t
t
e
n
a
s
"
0
"
o
t
h
e
r
w
i
s
e
m
a
y
e
s
l
t
i
n
u
n
p
r
e
d
i
c
t
a
b
l
e
o
p
e
r
a
t
i
o
n
Interrupt Control Register  
Rev. 1.00  
34  
April 18, 2007  
 复制成功!