niranjan23
Member level 5
- Joined
- Jan 22, 2012
- Messages
- 94
- Helped
- 3
- Reputation
- 6
- Reaction score
- 2
- Trophy points
- 1,288
- Activity points
- 2,109
hiii....I am using at89s51 for two led on-off by a switch
My problem is when I press the switch of pin P1.0.... I get the output only 400mV to 500mV to pin P2.0 on multimeter but LED still ON
I want +5V on P2.0 how can I get it..???
I changed IC to 8052 but problem is still getting
according to datasheet of 8051 Logic high is +5V but I getting low Voltage to output pin P2.0....
the circuit is given below and also assembly code
Code for above circuit
org 0000h
mov p2,#00h
mov p1,#00h
back:mov a,p1
cjne a,#01h,go2 ; check whether switch 1 is pressed
setb p2.0 ; turn ON the LED
clr p2.0
sjmp back
go2:cjne a,#02h,back ;check whether switch 2 is pressed
setb p2.1 ;turn ON the LED
clr p2.1
sjmp back
Please tell me what is the problem and what I have to do for that..???
My problem is when I press the switch of pin P1.0.... I get the output only 400mV to 500mV to pin P2.0 on multimeter but LED still ON
I want +5V on P2.0 how can I get it..???
I changed IC to 8052 but problem is still getting
according to datasheet of 8051 Logic high is +5V but I getting low Voltage to output pin P2.0....
the circuit is given below and also assembly code
Code for above circuit
org 0000h
mov p2,#00h
mov p1,#00h
back:mov a,p1
cjne a,#01h,go2 ; check whether switch 1 is pressed
setb p2.0 ; turn ON the LED
clr p2.0
sjmp back
go2:cjne a,#02h,back ;check whether switch 2 is pressed
setb p2.1 ;turn ON the LED
clr p2.1
sjmp back
Please tell me what is the problem and what I have to do for that..???