công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

HT82B40R bảng dữ liệu(PDF) 21 Page - Holtek Semiconductor Inc

tên linh kiện HT82B40R
Giải thích chi tiết về linh kiện  I/O MCU with USB Interface
PDF  57 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  HOLTEK [Holtek Semiconductor Inc]
Trang chủ  http://www.holtek.com
Logo HOLTEK - Holtek Semiconductor Inc

HT82B40R bảng dữ liệu(HTML) 21 Page - Holtek Semiconductor Inc

Back Button HT82B40R Datasheet HTML 17Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 18Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 19Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 20Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 21Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 22Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 23Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 24Page - Holtek Semiconductor Inc HT82B40R Datasheet HTML 25Page - Holtek Semiconductor Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 21 / 57 page
background image
HT82B40R/HT82B40A
Rev. 1.10
21
September 4, 2009
org 04h
; USB interrupt vector
reti
org 08h
; Timer/Event Counter interrupt vector
jmp tmr0int
; jump here when Timer0 overflows
:
org 20h
; main program
;internal Timer/Event Counter 0 interrupt routine
Tmr0int:
:
; Timer/Event Counter 0 main program placed here
:
reti
:
:
begin:
;setup Timer registers
mov a,09bh
; setup Timer preload value
mov tmr0,a;
mov a,080h
; setup Timer control register
mov tmr0c,a
; timer mode
; setup interrupt register
mov a,005h
; enable master interrupt and timer interrupt
mov intc,a
set tmr0c.4
; start Timer/Event Counter - note mode bits must be previously setup
Interrupts
Interrupts are an important part of any microcontroller
system. When an internal function such as a Timer/Event
Counter overflow or a USB interrupt occur, their corre-
sponding interrupt will enforce a temporary suspension of
the main program allowing the microcontroller to direct
attention to their respective needs. while the internal in-
terrupts are controlled by the Timer/Event Counter over-
flow, USB interrupt or reception.
Interrupt Register
Overall interrupt control, which means interrupt enabling
and request flag setting, is controlled by an interrupt
control register. By controlling the appropriate enable
bits in this register each individual interrupt can be en-
abled 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.
Interrupt Operation
When a USB interrupt occurs or one of the Timer/Event
Counters overflow, if their appropriate interrupt enable
bit is set, the Program Counter, which stores the ad-
dress of the next instruction to be executed, will be
transferred onto the stack. The Program 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 another
section of program which is known as the interrupt ser-
vice routine. Here is located the code to control the ap-
propriate interrupt. The interrupt service routine must be
terminated with a RETI statement, which retrieves the
original Program Counter address from the stack and al-
lows the microcontroller to continue with normal execu-
tion at the point where the interrupt occurred.
The various interrupt enable bits, together with their as-
sociated request flags, are shown in the accompanying
diagram 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
related interrupt is enabled, until the Stack Pointer is
decremented. If immediate service is desired, the stack
must be prevented from becoming full.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com