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.

Problems with switch for a PIC

Status
Not open for further replies.

apple

Newbie level 5
Joined
Feb 21, 2005
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,370
hi, i am connecting a switch to my PIC to toggle the program to stop and call the program go back to the main program. But whenever i toggle the button, my LCD will "hang" and display odd words. i have tested using connect 5V directly to the circuit and no problem occurs. But when i soldered the switch to it, there are problems occur.
Can anyone help me??????
 

switch problem?

Hi,

Did you set the input pin to the correct level ( input and not output? )
Also, see what happens to the voltage on the board, when you press the switch. Do you still have 5 volts or you get a faling spike?
Also, Try using a falling edge on the switch. i.e. the line to the pic is connected with a pull up and when you press the button you will connect the ground to the PIC input.
If all failes, post a schmatic so we can have a look and find out the problem.

If you found my answer useful, click on the button that says Helped me. ( NO points will be taken from you! )


Good luck.
 

    apple

    Points: 2
    Helpful Answer Positive Rating
Re: switch problem?

May be your button "ringing" and looks for your program as multiple pressings occur? Check this, it is a frequent problem ...
 

switch problem?

Use a debounce, there it will help you stabilize your shift in signal.
 

Re: switch problem?

try to add 0.1uF across the input of the mcu and ground, that will do help to minimize the ringing due to the switch operation.
 

Re: switch problem?

apple said:
hi, i am connecting a switch to my PIC to toggle the program to stop and call the program go back to the main program. But whenever i toggle the button, my LCD will "hang" and display odd words. i have tested using connect 5V directly to the circuit and no problem occurs. But when i soldered the switch to it, there are problems occur.
Can anyone help me??????

post your schematic showing how you interface the switch..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top