With 100 ohms from +5 to the collector of opto, you will force 50mA through opto. This is the absolute max according to the data sheet. It will lead sooner or later to the destruction of the opto.

Please do use 10K from +5 to the collector of the opto and drive from the collector the PIC port. The emitter of the opto will be earthed.

Everytime you feed current to the LED of the opto, the PIC port will be low and when the LED is off, port will be high.

Ioannis