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

HT46F47E 参数 Datasheet PDF下载

HT46F47E图片预览
型号: HT46F47E
PDF下载: 下载PDF文件 查看货源
内容描述: 高性价比的A / D型闪存的8位微控制器与EEPROM [Cost-Effective A/D Flash Type 8-Bit MCU with EEPROM]
分类和应用: 闪存微控制器可编程只读存储器电动程控只读存储器电可擦编程只读存储器
文件页数/大小: 88 页 / 541 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HT46F47E的Datasheet PDF文件第41页浏览型号HT46F47E的Datasheet PDF文件第42页浏览型号HT46F47E的Datasheet PDF文件第43页浏览型号HT46F47E的Datasheet PDF文件第44页浏览型号HT46F47E的Datasheet PDF文件第46页浏览型号HT46F47E的Datasheet PDF文件第47页浏览型号HT46F47E的Datasheet PDF文件第48页浏览型号HT46F47E的Datasheet PDF文件第49页  
HT46F46E/HT46F47E/HT46F48E/HT46F49E  
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.  
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  
The various interrupt enable bits, together with their as-  
sociated request flags, are shown in the following dia-  
gram with their order of priority.  
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.  
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, 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  
Counter, which stores the address of the next instruction  
to be executed, will be transferred onto the stack. The  
b
7
b
0
A
D
F
E
T
I
F
E
F
A
D
E
I
T
I
E
E
E
I
M
I
I
N
T
C
R
e
g
i
s
t
e
r
M
1
0
a
s
t
e
r
I
n
t
e
r
r
u
p
t
G
l
o
b
a
l
:
:
g
g
l
l
o
o
b
b
a
l
l
e
n
a
b
l
e
a
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
:
:
e
d
n
i
a
b
l
e
s
a
b
l
e
T
1
0
i
m
e
r
/
E
v
e
n
t
C
o
u
n
t
e
r
I
n
t
:
:
e
d
n
i
a
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
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
:
:
a
i
c
t
i
c
v
e
n
a
t
i
v
e
T
1
0
i
m
e
r
/
E
v
e
n
t
C
o
u
n
t
e
r
I
n
t
:
:
c
t
a
i
i
v
e
n
a
c
t
i
v
e
A
1
0
/
D
C
o
n
v
e
r
t
e
r
I
n
t
e
r
r
u
p
t
:
:
a
i
c
t
i
v
e
c
t
n
i
v
a
e
F
M
r
o
r
t
e
s
t
m
o
d
e
u
s
e
o
n
l
y
.
u
s
t
b
e
w
r
i
t
t
e
n
a
s
"
0
"
o
e
s
u
l
t
i
n
u
n
p
r
e
d
i
c
t
a
b
l
e
Interrupt Control Register  
Rev. 1.40  
45  
July 28, 2009  
 复制成功!