Weird input situation in a PIC circuit

AI Thread Summary
A PIC circuit was initially functioning correctly, activating output pins when a magnetic reed switch received a logic 1. However, the output pins began activating even when the switch was open, and checking the input pin voltage caused the outputs to stop. The issue was identified as a broken link between the switch and a pull-up resistor, which resulted in a floating input situation. Once the link was repaired, the circuit operated as intended. Proper connections and resistor values are crucial for stable circuit performance.
Zalajbeg
Messages
77
Reaction score
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
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.
 
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.
 
Very basic question. Consider a 3-terminal device with terminals say A,B,C. Kirchhoff Current Law (KCL) and Kirchhoff Voltage Law (KVL) establish two relationships between the 3 currents entering the terminals and the 3 terminal's voltage pairs respectively. So we have 2 equations in 6 unknowns. To proceed further we need two more (independent) equations in order to solve the circuit the 3-terminal device is connected to (basically one treats such a device as an unbalanced two-port...
suppose you have two capacitors with a 0.1 Farad value and 12 VDC rating. label these as A and B. label the terminals of each as 1 and 2. you also have a voltmeter with a 40 volt linear range for DC. you also have a 9 volt DC power supply fed by mains. you charge each capacitor to 9 volts with terminal 1 being - (negative) and terminal 2 being + (positive). you connect the voltmeter to terminal A2 and to terminal B1. does it read any voltage? can - of one capacitor discharge + of the...
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Back
Top