Re: infra red
You have the tx part ( infrared) and the receiver part (infrared receiver)
you have to give a signal to the infrared tx. if the turning on of the tx you want it to be controlled by the pic then, it has to be connected to the pic as output. if not ( make always on) no need to connect it to the pic.
As for the receiver it has to be an input to the pic so that the voltage will be measured.
Specify the components used so that i may be more useful
good luck