What phototransistor are you using? Generally, the collector needs a far lower resistance than the WPU's in the PIC. Maybe disable WPU's (if they enable in analog mode) and tie a suitable external resistor to B+. Or try a photoresistor instead. Good luck.
Bookmarks