ergman
Newbie level 5
I am interfacing ADC 0804 with AT89s52. Can i just ground the pin 1 of adc 0804 and write the following conversion code(Assembly):
SOC: ;Start of Conversion
CLR WRITE ;WRITE is pin 2 of 89s52 which is connected to pin 3 of adc0804
NOP
SETB WRITE
JB INTR,$ ;INTR is pin 3 of 89s52 which is connected to pin 5 of adc0804
RET
READADC: ;Read ADC output
CLR READ ;READ is pin 1 of 89s52 which is connected to pin 2 of adc0804
NOP
MOV A,ADCPORT
SETB READ
RET
Is there anything wrong with this code????
SOC: ;Start of Conversion
CLR WRITE ;WRITE is pin 2 of 89s52 which is connected to pin 3 of adc0804
NOP
SETB WRITE
JB INTR,$ ;INTR is pin 3 of 89s52 which is connected to pin 5 of adc0804
RET
READADC: ;Read ADC output
CLR READ ;READ is pin 1 of 89s52 which is connected to pin 2 of adc0804
NOP
MOV A,ADCPORT
SETB READ
RET
Is there anything wrong with this code????