欢迎访问ic37.com |
会员登录 免费注册
发布采购

HA0075E 参数 Datasheet PDF下载

HA0075E图片预览
型号: HA0075E
PDF下载: 下载PDF文件 查看货源
内容描述: 高性价比的A / D型8位MCU [Cost-Effective A/D Type 8-Bit MCU]
分类和应用:
文件页数/大小: 60 页 / 463 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HA0075E的Datasheet PDF文件第25页浏览型号HA0075E的Datasheet PDF文件第26页浏览型号HA0075E的Datasheet PDF文件第27页浏览型号HA0075E的Datasheet PDF文件第28页浏览型号HA0075E的Datasheet PDF文件第30页浏览型号HA0075E的Datasheet PDF文件第31页浏览型号HA0075E的Datasheet PDF文件第32页浏览型号HA0075E的Datasheet PDF文件第33页  
HT46R4A  
Start_conversion:  
clr  
set  
clr  
Polling_EOC:  
sz  
START  
START  
START  
; reset A/D  
; start A/D  
EOCB  
; poll the ADCR register EOCB bit to detect end  
; of A/D conversion  
; continue polling  
; read low byte conversion value  
; save result to user defined memory  
; read high byte conversion value  
jmp  
mov  
mov  
mov  
mov  
polling_EOC  
a,ADRL  
adr_low_buffer,a  
a,ADRH  
adr_high_buffer,a ; save result to user defined memory  
:
jmp  
start_conversion  
; start next A/D conversion  
Example: using an interrupt method to detect the end of conversion  
clr  
EADI  
a,00000001B  
ACSR,a  
; disable ADC interrupt  
mov  
; setup the ACSR register to select fSYS/8 as  
; the A/D clock  
mov  
mov  
a,00100000B  
; setup ADCR register to configure Port PB0~PB3  
; as A/D inputs  
; and select AN0 to be connected to the A/D  
; converter  
ADCR,a  
:
; As the Port B channel bits have changed the  
; following START  
; signal (0-1-0) must be issued within 10  
; instruction cycles  
:
Start_conversion:  
clr  
set  
clr  
clr  
set  
set  
START  
START  
START  
ADF  
EADI  
EMI  
:
; reset A/D  
; start A/D  
; clear ADC interrupt request flag  
; enable ADC interrupt  
; enable global interrupt  
:
:
; ADC interrupt service routine  
ADC_ISR:  
mov  
mov  
mov  
acc_stack,a  
a,STATUS  
status_stack,a  
:
; save ACC to user defined memory  
; save STATUS to user defined memory  
:
a,ADRL  
adr_low_buffer,a  
a,ADRH  
adr_high_buffer,a ; save result to user defined memory  
:
mov  
mov  
mov  
mov  
; read low byte conversion value  
; save result to user defined register  
; read high byte conversion value  
EXIT_INT_ISR:  
mov  
mov  
mov  
reti  
a,status_stack  
STATUS,a  
a,acc_stack  
; restore STATUS from user defined memory  
; restore ACC from user defined memory  
Rev. 1.00  
29  
November 28, 2007  
 复制成功!