HT46R64 Holtek Semiconductor Inc., HT46R64 Datasheet - Page 24

no-image

HT46R64

Manufacturer Part Number
HT46R64
Description
Ht46r64/ht46c64 -- A/d With Lcd Type 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT46R64
Manufacturer:
Bussmann
Quantity:
25 000
Part Number:
HT46R64
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
Company:
Part Number:
HT46R64
Quantity:
9 000
Company:
Part Number:
HT46R64
Quantity:
18
The following programming example illustrates how to setup and implement an A/D conversion. The method of polling
the EOCB bit in the ADCR register is used to detect when the conversion cycle is complete.
Example: using EOCB Polling Method to detect end of conversion
Start_conversion:
Polling_EOC:
Rev. 1.80
mov
mov
mov
mov
clr
set
clr
sz
jmp
mov
mov
mov
mov
jmp
a,00000001B
ACSR,a
a,00100000B
ADCR,a
:
:
:
START
START
START
EOCB
polling_EOC
a,ADRH
adrh_buffer,a
a,ADRL
adrl_buffer,a
:
:
start_conversion
; setup the ACSR register to select f
; setup ADCR register to configure Port PB0~PB3 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 within 10 instruction cycles
; reset A/D
; start A/D
; poll the ADCR register EOCB bit to detect end of A/D conversion
; continue polling
; read conversion result high byte value from the ADRH register
; save result to user defined memory
; read conversion result low byte value from the ADRL register
; save result to user defined memory
; start next A/D conversion
A/D Conversion Timing
24
SYS
/8 as the A/D clock
HT46R64/HT46C64
February 14, 2006

Related parts for HT46R64