0
3.8kviews
Interface an 8 bit ADC with 8051. Draw detail interfacing diagram and also write program for the same.
1 Answer
0
84views
               ALE      BIT P2.4
               OE       BIT P2.5
               SC       BIT P2.6
               EOC      BIT P2.7
               ADDR_A   BIT P2.0
               ADDR_B   BIT P2.1
               ADDR_C   BIT P2.2
               ADCC     EQU P1
               ORG      0H
               MOV      ADCC, #0FFH               ; Make P1 as input port 
               SETB     EOC                              
               CLR      ALE                                
               CLR      SC
               CLR      OE
UP:            CLR      ADDR_C
               CLR      ADDR_B
               SETB     ADDR_A                     ; Select channel A
               ACALL    DELAY
               SETB     ALE                        ; Latch the address
               ACALL    DELAY 
               SETB     SC
               ACALL    DELAY
               CLR      ALE
               CLR      SC
HERE:          JB       EOC, HERE 
HERE1:         JNB      EOC, HERE1                   
               SETB     OE                              
               ACALL    DELAY 
               MOV      A, ADCC
               CLR      OE!
               SJMP     UP


DELAY: MOV R2, #500    
ROUND: DJNZ R3, ROUND
       RET

8051 interfaced with ADC 0809 for channel A !

Please log in to add an answer.