English
Language : 

HT46R321 Datasheet, PDF (21/45 Pages) Holtek Semiconductor Inc – A/D Type 8-Bit OTP MCU with OPA and 8x4 LED Driver
HT46R321
set EADI
set EMI
:
:
:
; ADC interrupt service routine
ADC_ISR:
mov acc_stack,a
mov a,STATUS
mov status_stack,a
:
:
mov a,ADRH
mov adrh_buffer,a
mov a,ADRL
mov adrl_buffer,a
clr START
set START
clr START
:
:
EXIT_INT_ISR:
mov a,status_stack
mov STATUS,a
mov a,acc_stack
reti
; enable ADC interrupt
; enable global interrupt
; save ACC to user defined memory
; save STATUS to user defined memory
; read conversion result high byte value from the ADRH register
; save result to user defined register
; read conversion result low byte value from the ADRL register
; save result to user defined register
; reset A/D
; start A/D
; restore STATUS from user defined memory
; restore ACC from user defined memory
STAR T
M in im u m o n e in s tr u c tio n c y c le n e e d e d , M a x im u m te n in s tr u c tio n c y c le s a llo w e d
EO CB
A /D s a m p lin g tim e
tA D C S
A /D s a m p lin g tim e
tA D C S
A /D s a m p lin g tim e
tA D C S
P C R 2~
PCR0
000B
A C S 2~
ACS0
000B
P o w e r-o n
R eset
100B
010B
S ta rt o f A /D
c o n v e r s io n
100B
000B
S ta rt o f A /D
c o n v e r s io n
101B
001B
S ta rt o f A /D
c o n v e r s io n
000B
1 . P B p o rt s e tu p a s I/O s
2 . A /D c o n v e r te r is p o w e r e d o ff
to r e d u c e p o w e r c o n s u m p tio n
d o n 't c a r e
R e s e t A /D
c o n v e rte r
R e s e t A /D
c o n v e rte r
R e s e t A /D
c o n v e rte r
1 : D e fin e P B c o n fig u r a tio n
2 : S e le c t a n a lo g c h a n n e l
E n d o f A /D
c o n v e r s io n
E n d o f A /D
c o n v e r s io n
E n d o f A /D
c o n v e r s io n
tA D C
tA D C
tA D C
A /D c o n v e r s io n tim e
A /D c o n v e r s io n tim e
A /D c o n v e r s io n tim e
N o te : A /D c lo c k m u s t b e fS Y S /2 , fS Y S /8 o r fS Y S /3 2
tA D C S = 3 2 tA D
tA D C = 8 0 tA D
A/D Conversion Timing
Rev. 1.00
21
August 3, 2007