參數(shù)資料
型號: HT46R64
廠商: Holtek Semiconductor Inc.
英文描述: A/D with LCD Type 8-Bit MCU
中文描述: 在A / D液晶型8位微控制器
文件頁數(shù): 23/47頁
文件大小: 345K
代理商: HT46R64
HT46R64/HT46C64
Rev. 1.40
23
September 21, 2004
WhentheA/Dconversioniscompleted,theA/Dinterruptrequestflagisset.TheEOCBbitissetto 1 whentheSTART
bit is set from 0 to 1 .
Register
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
ADRL
D1
D0
ADRH
D9
D8
D7
D6
D5
D4
D3
D2
Note: D0~D9 is A/D conversion result data bit LSB~MSB.
The following two programming examples illustrate how to setup and implement an A/D conversion. In the first exam-
ple, the method of polling the EOCB bit in the ADCR register is used to detect when the conversion cycle is complete,
whereas in the second example, the A/D interrupt is used to determine when the conversion is complete.
Example: using EOCB Polling Method to detect end of conversion
clr INTC0.7
mov a,00100000B
mov ADCR,a
; disable A/D interrupt in interrupt control register
; setup ADCR register to configure Port PB0~PB3 as A/D inputs and select
; AN0 to be connected to the A/D converter
mov a,00000001B
mov ACSR,a
; setup the ACSR register to select f
SYS
/8 as the A/D clock
Start_conversion:
clr ADCR.7
set ADCR.7
clr ADCR.7
; reset A/D
; start A/D
Polling_EOC:
sz ADCR.6
jmp polling_EOC
mov a,ADRH
mov adrh_buffer,a
mov a,ADRL
mov adrl_buffer,a
; poll the ADCR register EOCB bit to detect end of A/D conversion
; continue polling
; read conversion result from the high byte ADRH register
; save result to user defined register
; read conversion result from the low byte ADRL register
; save result to user defined register
:
:
jmp start_conversion
; start next A/D conversion
Example: using Interrupt method to detect end of conversion
set INTC0.0
set INTC0.7
mov a,00100000B
mov ADCR,a
; interrupt global enable
; enable A/D interrupt in interrupt control register
; setup ADCR register to configure Port PB0~PB3 as A/D inputs and select
; AN0 to be connected to the A/D converter
mov a,00000001B
mov ACSR,a
; setup the ACSR register to select f
SYS
/8 as the A/D clock
start_conversion:
clr ADCR.7
set ADCR.7
clr ADCR.7
; reset A/D
; start A/D
:
:
; interrupt service routine
EOC_service routine:
mov a_buffer,a
mov a,ADRH
mov adrh_buffer,a
mov a,ADRL
mov adrl_buffer,a
; save ACC to user defined register
; read conversion result from the high byte ADRH register
; save result to user defined register
; read conversion result from the low byte ADRL register
; save result to user defined register
clr ADCR.7
set ADCR.7
clr ADCR.7
; reset A/D
; start A/D
mov a,a_buffer
reti
; restore ACC from temporary storage
相關(guān)PDF資料
PDF描述
HT46R23 8-Bit OTP Microcontroller
HT46R47 8-Bit OTP Battery Charger Controller
HT46R65-100 A/D with LCD Type 8-Bit MCU
HT46C65 A/D with LCD Type 8-Bit MCU
HT46C65-100 A/D with LCD Type 8-Bit MCU
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
HT46R64_06 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D with LCD Type 8-Bit MCU
HT46R64_11 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D with LCD Type 8-Bit MCU
HT46R65 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D with LCD Type 8-Bit MCU
HT46R65_11 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D with LCD Type 8-Bit MCU
HT46R65-100 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D with LCD Type 8-Bit MCU