Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ADC0804 with ATt89s52 PROBLEM IN GETTNG VALUU

Status
Not open for further replies.

kirtan.gopal

Newbie level 4
Newbie level 4
Joined
Mar 26, 2014
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
34
I have implement in Proteus8 its working but not on physical model it always give 254 value in return.help me ......

Code:
ADC:  
  MOV P1,#00H   
  CLR P2.6  
  SETB P2.5  
  CLR P2.4 
  ACALL  DELAY_200M
  ACALL  DELAY_200M
  SETB P2.4 ; low to high pulse to WR for starting conversion
    MOV R7,#225
Del_1_Sec4:
  DJNZ  R7,Del_1_Sec4
  WAIT: JB P2.7,WAIT ; polls until INTR=0
    CLR P2.6 ; ensures CS=0
  MOV R7,#225
Del_1_Sec0:
  DJNZ  R7,Del_1_Sec0
  CLR P2.5 ; high to low pulse to RD for reading the data from ADC
  MOV R7,#225
Del_1_Sec1:
  DJNZ  R7,Del_1_Sec1
  MOV VALUE,P0
   SETB P2.6
  SETB P2.5
  RET

where
wr- p2.4
rd-p2.5
cs p2.6
intr 2.7
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top