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.

AT89s51 taking input problem

Status
Not open for further replies.

mohammad_talha

Newbie level 3
Joined
Jul 15, 2006
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
Ok..this might sound silly but i have a serious problem..i am trying to connect a simple switch to AT89s51 and once connected the switch ..the switch works perfectly fine ..but if i TOUCH the pin to which the switch is connected OR touch a piece of wire to ..say P2.0...it is actuated...i.e a low is detected in the programming...how can i avoid it..i.e the touch should not give a low unless it is actually grounded..
 

This should work:

68_1192140207.jpg


Now your line is low ohmic and so less sensitive to noise. Eventually you can also connect a small capacitor (10n -- 100n ) over the switch.
 

i am using a 10k resistor instead of 4k7in the same configuration..still doesnt work :(
 

Try lowering the resistor. 1K or 470?. (1/4watt resistors)
The lower the resistor is the less sensitive it is to noise.
Touching directly a pin is much more sensitve then thouching the wire.
Also try the capacitor as mentioned before.
 

i think you know to set the pin to 1 , then try to reading
you can simple wire the button on P3.2 or P3.3 /int0; int1/ and make a simple interrupt with led
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top