working on a project that uses 4 proximity magnetic sensors. 2 max positions and 2 home positions(horizontal and vertical). these sensors are connected to a PIC.
problem is I only have 2 inputs left on the pic. I was using a relay to switching them, but sometimes getting some false readings. I think is because of the relay's contacts bouncing.
Does the PIC have an ADC? If so, wire the switches to some binary-weighted resistors to create sixteen different analog voltages which you can read through one PIN...
If the outputs of the proximity switches are logic level, then drop in some logic and build a 2-of-4 multiplexer controlled by the same pins the relay and proximity switch use currently. I know they make a small one, like 1 of 3 or something. I'll look.
Found them. 74153 is a dual 4 input 1 output multiplexer and the 74157 is a quad 2 input 1 output multiplexer. From the description I would suggest the '157.