- This topic has 0 replies, 1 voice, and was last updated 13 years, 8 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › interfacing adc 0804 with 89c51 simulation problem
hi. i have a problem in simulation am using protues and have done coding in keil assembly language. adc is connected to p2 of 89c51 and i want to move the data from p2 to p3 ,as i change the value from variable resistor the values on data bits changes but am not getting output on p3. here is code and simulation jpeg. please help me
; ADC port using port 2
; WR ADC port 1.1
; RD ADC port 1.0
; CS ADC connect to ground
;=================================================
org 00h
mov p2, #0ffh
ADC:
clr P1.1
nop
nop
nop
setb P1.1
eoc:
jb P1.3,eoc
clr P1.0
mov A,P2
mov p3,A
setb P1.0
sjmp ADC
end