Can I use PWM (PIC RB3) to modulate an IR diode?

Yes, of course you can - but it's hardly worth while, it's simple to do it in software - and probably easier than accurately modulating the PWM.

From that diagram I presume you're only looking for a short range?, as the series resistor is so high.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…