EasyManuals Logo

Holtek HT48R30A-1 User Manual

Default Icon
174 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #60 background imageLoading...
Page #60 background image
include ht48r50a-1.inc
jmp begin
:
:
org 04h ; external interrupt vector
reti
org 08h ; timer-counter 0 interrupt vector
jmp tmr0int ; jump here when timer 0 overflows
org 0ch ; timer-counter 1 interrupt vector
jmp tmr1int ; jump here when timer 1 overflows
:
:
org 20h ; main program
:
:
;internal timer 0 interrupt routine
tmr0int:
:
;timer 0 main program placed here
:
reti
:
;internal timer 1 interrupt routine
tmr1int:
:
; timer 1 main program placed here
:
reti
:
:
begin:
;setup timer 0 registers
mov a,09bh ; setup timer 0 preload value
mov tmr0,a;
mov a,081h ; setup timer 0 control register
mov tmr0c,a ; timer mode and prescaler set to /4
;setup_timer 1 registers
clr tmr1l ; clear both low and high bytes to give maximum
; count
clr tmr1h
mov a,080h ; setup timer 1 control register
mov tmr1c,a ; timer 1 has no prescaler
;setup interrupt register
mov a,00dh ; enable master interrupt and both timer
; interrupts
mov intc,a
:
:
set tmr0c.4 ; start timer 0
set tmr1c.4 ; start timer 1
:
:
Chapter 1 Hardware Structure
51

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Holtek HT48R30A-1 and is the answer not in the manual?

Holtek HT48R30A-1 Specifications

General IconGeneral
BrandHoltek
ModelHT48R30A-1
CategoryMicrocontrollers
LanguageEnglish

Related product manuals