Sunday, November 20, 2011

Clock source for ADC0804

The speed at which analog input is converted to digital output depends on the speed of clk input.
According to datasheets of ADC0804 the typical operating frequency is 640khz at 5 volts. there are 2 ways to provide clock

source to ADc0804. as shown in fig.
ADC0804 with self clocking
ADC0804 with 8051 crystal clocking

Programming
; P2.5 CONNECTED TO RD
; P2.6 TO WR

; P2.7 TO INTR
; WR IS USED FOR STARTING CINVERSION
; SHOULD GO FROM L - H FOR CI=ONVERSION TO START
; CLR RD TO START READING DATA

ORG 0000H
RD BIT P2.5
WR BIT P2.6
INTR BIT P2.7
MYDATA EQU P1    ; DATA BUS OF ADC0804
MOV P1,#0FFH    ; MAKE P1 INPUT
SETB INTR

BACK :
CLR WR
SETB WR

HERE :
JB INTR, HERE    ; WAIT FOR END OF CONVERSION
CLR RD        ; START READING
MOV A, MYDATA    ;
ACALL CONVERSION; YOUR CONVERSION HEX - ASCCII
ACALL DISPLAY    ; DISPLAY DATA
SETB RD        ; RD =1 FOR NEXT ROUND
SJMP BACK    ;

CONVERSION :
; ANY HEX TO ASCII CONVERSION PROGRAM WILL DO.

DISPLAY : 
; AS NO DISPLAY THEREFORE NOT TO BE USED

No comments:

Post a Comment