数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

HT86B05 数据表(PDF) 38 Page - Holtek Semiconductor Inc

部件名 HT86B05
功能描述  Enhanced Voice 8-Bit MCU
PDF  79 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  HOLTEK [Holtek Semiconductor Inc]
网页  http://www.holtek.com
标志 HOLTEK - Holtek Semiconductor Inc

HT86B05 数据表(HTML) 38 Page - Holtek Semiconductor Inc

Back Button HT86B05 Datasheet HTML 34Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 35Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 36Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 37Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 38Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 39Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 40Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 41Page - Holtek Semiconductor Inc HT86B05 Datasheet HTML 42Page - Holtek Semiconductor Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 38 / 79 page
background image
HT86BXX/HT86BRXX
Rev. 1.60
38
October 20, 2009
Prescaler
All of the 8-bit timers possess a prescaler. Bits 0~2 of
their associated timer control register, define the
pre-scaling stages of the internal clock source of the
Timer. The Timer overflow signal can be used to gener-
ate signals for the Timer interrupt.
Programming Considerations
The internal system clock is used as the timer clock
source and is therefore synchronized with the overall
operation of the microcontroller. In this mode, when the
appropriate timer register is full, the microcontroller will
generate an internal interrupt signal directing the pro-
gram flow to the respective internal interrupt vector.
When the Timer is read, the clock is blocked to avoid er-
rors, however as this may result in a counting error, this
should be taken into account by the programmer. Care
must be taken to ensure that the timers are properly ini-
tialized before using them for the first time. The associ-
ated timer enable bits in the interrupt control register must
be properly set otherwise the internal interrupt associated
with the timer will remain inactive. The edge select, timer
mode and clock source control bits in timer control regis-
ter must also be correctly set to ensure the timer is prop-
erly configured for the required application. It is also
important to ensure that an initial value is first loaded into
the timer registers before the timer is switched on; this is
because after power-on the initial values of the timer reg-
isters are unknown. After the timer has been initialized
the timer can be turned on and off by controlling the en-
able bit in the timer control register.
Timer Program Example
The following example program section is based on the
HT86B40, HT86B50, HT86B60, HT86BR60, HT86B70,
HT86B80 and HT86B90 devices, which contain a single
internal 16-bit timer. Programming the timer for other de-
vices is conducted in a very similar way. The program
shows how the timer registers are setup along with how
the interrupts are enabled and managed. Points to note
in the example are how, for the 16-bit timer, the low byte
must be written first, this is because the 16-bit data will
only be written into the actual timer register when the
high byte is loaded. Also note how the timer is turned on
by setting bit 4 of the respective timer control register.
The timer can be turned off in a similar way by clearing
the same bit. This example program sets the timer to be
in the timer mode which uses the internal system clock
as their clock source.
#include HT86B40.inc
jmp begin
:
org 04h
; external interrupt vectors
reti
org 08h
reti
org 0Ch
reti
org 10h
; timer 2 interrupt vector
jmp tmr2int
; jump here when timer 2 overflows
org 14h
reti
:
; internal timer 2 interrupt routine
tmr2int:
:
; timer 2 main program placed here
:
reti
:
begin:
; setup timer 2 registers
mov a,09bh
; setup timer 2 low byte
mov tmr2l,a
; low byte must be setup before high byte
mov a,0e8h
; setup timer 2 high byte
mov tmr2h,a
; setup timer 2 high byte
mov a,090h
; setup timer 2 control register
mov tmr2c,a
; setup timer mode
; setup interrupt register
mov a,01h
; enable master interrupt
mov intc,a
mov a,01h
; enable timer 2 interrupt
mov intch,a
:



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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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