Thanks to everyone for their help last time. After some changes in the code and circuit, I managed to make it work on a breadboard, but I ran into some problems after connecting the output of my IR sensor to the PIC16F84A Port A pins, which are set as input. I tested the IR sensor, and it works fine, but the moment I connect it to the breadboard, the LED indicator lights up permanently for some reason, which should really only be triggered if there is an object nearby that reflects the IR lights emitted. I have attached below a picture of the exact IR sensor that I used, and if I base it on the circuit, it seems like the PIC sends back a voltage to light up the indicator LED of the IR. I have 4 IR sensors connected to 4 Port A pins, and every single one of their indicator LEDs lights up after being connected. So my questions are as follows:
1. Is it normal for voltage to be present at the pins of the PIC even though it is set as an input?
2. Do I have to set these Port A pins with a voltage "low" in the code?
3. Should the 5 volt VCC of the IR sensor be independent of the VCC of the PIC16 so that they won't share a common ground?