Weird input situation in a PIC circuit

In summary, the conversation discusses a circuit built with a PIC and a magnetic reed switch that activates LED lights when a specific pin receives a logic 1. The issue is that the output pins are being activated even when the reed switch is open. The suggestion is to use a pull-up/down resistor on the switch input pin. After trying this, it is discovered that the issue was due to a broken link between the switch and the resistor. This highlights the importance of addressing floating situations in circuits.
  • #1
Zalajbeg
78
3
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:
Engineering news on Phys.org
  • #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.
 
  • #3
schip666! said:
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.

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.
 

Related to Weird input situation in a PIC circuit

1. What is a PIC circuit?

A PIC (Peripheral Interface Controller) circuit is a type of microcontroller that is commonly used in electronic devices for controlling the input and output of signals. It is a small, single chip computer that can be programmed to perform various functions.

2. What do you mean by a "weird input situation" in a PIC circuit?

A "weird input situation" refers to an unexpected or abnormal behavior in the input signals of a PIC circuit. This could be caused by various factors such as electrical noise, faulty connections, or incorrect programming.

3. How do I troubleshoot a weird input situation in a PIC circuit?

The first step in troubleshooting a weird input situation is to check all the connections and make sure they are properly connected. Then, verify the code and make sure it is correctly written. You can also use debugging tools such as a logic analyzer to analyze the input signals and identify any issues.

4. Can a weird input situation damage the PIC circuit?

In most cases, a weird input situation will not damage the PIC circuit itself. However, if the input signals are too strong or contain voltage spikes, it could potentially damage the circuit. This is why it is important to properly design and test the circuit before connecting it to any external devices.

5. How can I prevent weird input situations in a PIC circuit?

To prevent weird input situations, it is important to properly design the circuit and use appropriate components. Make sure to use decoupling capacitors to filter out any electrical noise. Additionally, follow good coding practices and thoroughly test the code before implementing it in the circuit.

Similar threads

  • Electrical Engineering
Replies
3
Views
1K
Replies
37
Views
3K
Replies
10
Views
1K
  • Electrical Engineering
Replies
11
Views
2K
Replies
7
Views
1K
Replies
2
Views
451
Replies
26
Views
1K
  • Electrical Engineering
2
Replies
49
Views
2K
  • Electrical Engineering
Replies
14
Views
822
  • Electrical Engineering
Replies
5
Views
1K
Back
Top