HT45R37V Holtek Semiconductor Inc., HT45R37V Datasheet - Page 41

no-image

HT45R37V

Manufacturer Part Number
HT45R37V
Description
C/r-f Type 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT45R37V
Manufacturer:
HOLTEK
Quantity:
3 200
Example: using an EOCB polling method to detect the end of conversion
Start_conversion:
Polling_EOC:
Example: using the interrupt method to detect the end of conversion
Start_conversion:
; ADC interrupt service routine
ADC_:
EXIT__ISR:
Rev. 1.00
clr
mov
mov
mov
mov
clr
set
clr
sz
jmp
mov
mov
mov
mov
jmp
clr
mov
mov
mov
mov
clr
set
clr
clr
set
set
set
mov
a,STATUS
mov
mov
mov
mov
mov
mov
mov
mov
clr
reti
EADI
a,00000001B
ACSR,a
a,00001000B
ADCR,a
:
:
:
START
START
START
EOCB
polling_EOC
a,ADRL
adrl_buffer,a
a,ADRH
adrh_buffer,a
:
start_conversion
EADI
a,00000001B
ACSR,a
a,00001000B
ADCR,a
:
:
START
START
START
ADF
EADI
EMFI1
EMI
:
:
:
acc_stack,a
status_stack,a
:
:
a,ADRL
adrl_buffer,a
a,ADRH
adrh_buffer,a
:
:
a,status_stack
STATUS,a
a,acc_stack
ADF
; disable ADC interrupt
; select f
; setup ADCR register to configure Port PB0 as A/D inputs
; and select AN0 to be connected to the A/D converter
; As the Port B channel bits have changed the
; following START
; signal (0-1-0) must be issued
; instruction cycles
; reset A/D
; start A/D
; poll the ADCR register EOCB bit to detect end
; of A/D conversion
; continue polling
; read low byte conversion result value
; save result to user defined register
; read high byte conversion result value
; save result to user defined register
; start next A/D conversion
; disable ADC interrupt
; select f
; setup ADCR register to configure Port PB0
; as A/D inputs
; and select AN0 to be connected to the A/D
; As the Port B channel bits have changed the
; following START signal(0-1-0) must be issued
;
; reset A/D
; start A/D
; clear ADC interrupt request flag
; enable ADC interrupt
; enable multi-function 1 interrupt
; enable global interrupt
; save ACC to user defined memory
; save STATUS to user defined memory
; read low byte conversion result value
; save result to user defined register
; read high byte conversion result value
; save result to user defined register
; restore STATUS from user defined memory
; restore ACC from user defined memory
; clear ADC interrupt flag
SYS
SYS
/8 as A/D clock and turn on ADONB bit
/8 as A/D clock and turn on ADONB bit
41
October 20, 2009
HT45R37V

Related parts for HT45R37V