Current location - Quotes Website - Collection of slogans - Analog port problem of assembly language ADC0809
Analog port problem of assembly language ADC0809
ORG 0300H

ADCON:MOV DPTR, # 0F0FFH gated ADC0809 channel 0

MOV A, # 00H channel 0 = 00H channel 1 = 0 1h- channel 7 = 07H.

MOVX @DPTR,A; Start analog-to-digital conversion

Here: JNB P3.3, here; Judge whether the data conversion is completed, and wait if it is not.

MOVX A,@ DPTR; Read the converted data

MOV 20H,A; The voltage value on the thermistor at the current temperature read from ADC0809 is stored in units of 20H.

RET