8051+ADC0809
Discussion in "8051 Discussion Forum" started by Ûž TPS Ûž Jul 13, 2008.
Sun Jul 13 2008, 11:16 pm
sample code and circuit
;THIS DEMO PROGRAM READS DATA FROM ADC TO MCU AND
; OUTPUT WILL BE SHOWN IN P1 AS BINARY VALUE
;P0.0 = A0 P0.1 = A1 P0.2 = A2
;P3.2 = EOC
;P3.3 = START
;P3.6 = ALE
;P3.7 = OE
;DATA = PORT 2
MOV P0,#00H
MOV P1,#0FFH
MOV P2,#00H
MOV P3,#04H.............................
...................... please check attachment
Tags ADC0809 codeinterfacing ADC0809 with 8051assembly code for ADC0809 8051
;THIS DEMO PROGRAM READS DATA FROM ADC TO MCU AND
; OUTPUT WILL BE SHOWN IN P1 AS BINARY VALUE
;P0.0 = A0 P0.1 = A1 P0.2 = A2
;P3.2 = EOC
;P3.3 = START
;P3.6 = ALE
;P3.7 = OE
;DATA = PORT 2
MOV P0,#00H
MOV P1,#0FFH
MOV P2,#00H
MOV P3,#04H.............................
...................... please check attachment
Mon Jul 14 2008, 08:55 am
if this code really works ?
because i had experience interfacing 8051 and ADC before .
We nid to wait for the ADC to convert analog input to hex before it transfer to 8051
8051 is usually much faster than ADC . hence , we nid to check the busy flag of ADc while it was converting data
because i had experience interfacing 8051 and ADC before .
We nid to wait for the ADC to convert analog input to hex before it transfer to 8051
8051 is usually much faster than ADC . hence , we nid to check the busy flag of ADc while it was converting data
Mon Jul 14 2008, 08:47 pm
nice TPS
create drivers or say API kind of subroutines so people can easy use them

create drivers or say API kind of subroutines so people can easy use them

Powered by e107 Forum System