本帖最后由 mugangzhu 于 2009-9-17 17:06 编辑
;计算总和并存放在ADC_DH4T 和ADC_DL4(包括两个被清零的)
CAL_AD_ADD:
LDI TMP4,00H;清0
LDA ADC_DL1,01H;取ADC_DL1值
ADDM ADC_DL2,01H;ADC_DL1、ADC_DL2相加
LDA ADC_DH1,01H;取ADC_DH1值
ADCM ADC_DH2,01H;ADC_DH1、ADC_DH2相加(带进位)
LDI TBR,00H;A=0
ADCM TMP4,00H;相加后不是0吗(CY=0时)??????
LDA ADC_DL2,01H
ADDM ADC_DL3,01H
LDA ADC_DH2,01H
ADCM ADC_DH3,01H
139
LDI TBR,00H
ADCM TMP4,00H
LDA ADC_DL3,01H
ADDM ADC_DL4,01H
LDA ADC_DH3,01H
ADCM ADC_DH4,01H
LDI TBR,00H
ADCM TMP4,00H |