HT83F10 HOLTEK [Holtek Semiconductor Inc], HT83F10 Datasheet - Page 23

no-image

HT83F10

Manufacturer Part Number
HT83F10
Description
Flash Type Voice OTP MCU
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
Time Base
The Time Base function will generate a regular interrupt
signal synchronised to the system clock which can be
used by the application as a time base signal.
Time Base Operation
The Time Base operation is a very simple function for
the generation of a regular time signal. This is imple-
mented by generating a regular interrupt signal whose
enable/disabled and request flags are in the INTC regis-
ter. The clock source for the time base is the internal
f
value of 1024. It is this divided signal that generates the
internal interrupt. The Time Base Interrupt is enabled by
the ETBI bit in the INTC register and interrupt request
flag is the TBF flag in the same register. A time base of
1ms will therefor be generated from a system clock of
4MHz and a time base of 0.5ms will be generated from a
system clock source of 8MHz.
#include HT83F60.inc
org 04h
org 08h
org 0Ch
org 10h
org 14h
begin:
Rev. 1.00
SYS
/4 clock source, which is then divided internally by a
jmp begin
:
jmp time_base_int
reti
reti
reti
reti
:
time_base_int:
:
:
reti
:
mov a,03h
mov intc,a
; time base vector
; jump here when time base overflows per 0.5ms
; time base interrupt routine
; time base main program placed here
; setup interrupt register
; enable global and time base interrupt
; enable time base
23
Time base Example
The following example program section is based on the
HT83F60 device. The program shows how the Time
Base registers are setup along with how the interrupts
are enabled and managed. The points to note in the ex-
ample are how the Time Base is turned on by setting bit
4 of the INTC register. The Time Base can be turned off
in a similar way by clearing the same bit. This example
program sets the Time Base which uses the internal
system clock as their clock source, and produces a time
base interrupt every 0.5ms from a system source clock
of 8MHz.
HT83FXX
May 12, 2009

Related parts for HT83F10