1st, i have built the IR sensor in PCB board. So i tested the IR sensor only. Without detecting IR Light from emitter, output of LM324 is nearly 0V. When it detects, the output goes to 4.6V. So, basically it works fine. Then it is similar with the sketch. When i connect to PIC, without detecting IR light, output is 0V, when detect, it only shows 1.3V. When i take out the jumper wire from input PIC, without detect is 0V, after detect is 4.5V. Is it this skecth that u want?