In your case RB0 is an input so it is looking for 0 volts to 1.2 volts for a LOW and 3.6 volts to 5 for HIGH. It is best to use a pull up or pull down resistor so the pin will be 0 or 5 and not floating around. Another part or two but I like using external pulls and not rely on the internals.
So, when the sensor is sending its high signal to the PIC and connected to the PIC, what is the voltage.
Try making the pin high or low with out the sensor.






Bookmarks