Check this thread out. http://www.picbasic.co.uk/forum/showthread.php?t=6826

The current is very low from the photo diode in these parts.. Try pulling the PIC pin low through ( I use 10 meg ) or something close.

The big thing will be ambient light. I use these for linear encoders for hydraulic rams and conveyor belts, how the covers are built is critical.