Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Weird input situation in a PIC circuit

  1. Jun 21, 2013 #1
    Hey everyone,

    I have built a circuit which includes a PIC. The logic is that if a specific pin gets a logic 1, the output pins will be activated and LED lights will flash. I am controlling the input pin with a magnetic reed switch.

    It was working great few days ago. However today the output pins are activated even if the reed switch is open. The weird thing is that when I want to check the voltage in the input pin (I am linking one prob to the pin and the other one to the ground) the output pins stop.

    What can be the issue? I don't know why linking a theoretically infinitive resistance parallel to the circuit cause this stop. Could you please help me?

    Additional information: I plugged out the switch but it still activates the output pins. I broke the link and it still activates when I touch pin.
    Last edited: Jun 21, 2013
  2. jcsd
  3. Jun 22, 2013 #2
    You probably need a pull-up/down resistor on your switch input pin. 10-100K oughta do the trick.

    If you already have that in place, then we need a lot more information about your circuit and software.
  4. Jun 22, 2013 #3
    First of all I thank you very much for your reply. There had already been a resistor (4.7k) however I find out that the link was broken. When I fixed the link between the switch and the resistor it worked great. When I was a newbie to the topic someone mentioned about the floating situation and I experienced it with this broken link.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook