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.

[SOLVED] simple microcontroller ckt problem

Status
Not open for further replies.

gagandiep

Newbie level 2
Joined
Aug 24, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
im new with electronics and this is my first experiment:
im trying to make this simple circuit with an 89s51. the led must go on as i push the button and off as i leave it.

the problem is that it does not work......

Image010.jpg

someone please tell me if there is anything wrong with this circuit or this program made in kiel:

$mod51org 00h
setb p0.5
clr p3.5


check:
jnb p0.5, light
sjmp check


light:
setb p3.5
jnb p0.5,$
end

please suggest what else i could be doing wrong if the above are correct.
 

Do not use port 0 for button. Change it to port 2 and see if it works.

org 00h
setb p2.5
clr p3.5


check:
jnb p2.5, light
sjmp check


light:
setb p3.5
jnb p2.5,$
ret
end

You can use pull up resistor technique to use port 0.

Hopes this helps
Genovator
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top