HT47C20 Holtek Semiconductor Inc, HT47C20 Datasheet - Page 23

no-image

HT47C20

Manufacturer Part Number
HT47C20
Description
8-Bit Microcontroller
Manufacturer
Holtek Semiconductor Inc
Datasheet
It is strongly recommended to load first the de-
sired value for TMRBL, TMRBH, TMRAL, and
TMRAH registers, before turning on the re-
lated timer/event counter for proper operation.
Because the initial value of TMRBL, TMRBH,
TMRAL and TMRAH are unknown.
Example for Timer/event counter mode (disable interrupt):
clr tmrc
clr adcr.1
clr intc1.4
mov a, low (65536-1000)
mov tmrbl, a
mov a, high (65536-1000)
mov tmrbh, a
mov a, 00110000b
mov tmrc, a
p10:
clr wdt
snz intcl.4
jmp p10
clr intcl.4
; set timer mode
; clear timer/event counter interrupt request flag
; give timer initial value
; count 1000 time and then overflow
; timer clock source=T1 and timer on
; polling timer/event counter interrupt request flag
; clear timer/event counter interrupt request flag
; program contimue
23
If the timer/event counter is on, the TMRAH,
TMRAL, TMRBH and TMRBL cannot be read
or written to. Only when the timer/event coun-
ter is off and when the instruction ²MOV² is
used could those four registers be read or writ-
ten to.
January 18, 2000
HT47C20

Related parts for HT47C20