I am not at the office today so the best I can do (between "honey do" items) is the following for a 12F or 12C series. I think it was posted on rentron.com, this is an example not finished.
Use the inline assembler command in PBP and pop in the code segments that toggle at 38Khz..... you may need to do some massaging though with the code. Use a scope on the data out pin of the IR receiver to make sure your code gives you good solid data output. Do not test RX in close proximity to TX, put your tx out about 10ft or so to make sure even at low signal levels the data makes it through. The analog filters severely reduce signals that are slightly outside of it's center band.
So for every "1" call this in a subroutine with a counter to count 10x through the loop before exiting, for every "0" just pause an equal duration to a "1" for symmetry . If you can... set up your bit duration and start/stop bits so that it is compatible to Serin set for 1200bps on RX side for example....for ease.
Monday I will post 16F code to set the hardware PWM output to 38Khz.
PROCESSOR 12c508
#include "p12c508.inc"
__CONFIG _MCLRE_OFF & _CP_OFF & _WDT_OFF & _IntRC_OSC
#DEFINE PORT B'11111101'
MOVF OSCCAL
MOVLW PORT
TRIS GPIO
BEGIN
BCF GPIO, 1 ;1uS
NOP ;2uS each nop is 1uS long
NOP ;3uS
NOP ;4uS
NOP ;5uS
NOP ;6uS
NOP ;7uS
NOP ;8uS
NOP ;9uS
NOP ;10uS
NOP ;11uS
NOP ;12uS
NOP ;13uS
NOP ;14uS
NOP ;15uS
NOP ;16uS
NOP ;17uS
NOP ;18uS
NOP ;19uS
BSF GPIO, 1 ;1uS Begin HIGH duty cycle
NOP ;2uS
NOP ;3uS
NOP ;4uS
NOP ;5uS
GOTO BEGIN ;2uS (26uS total for 38KHz)
END
Bookmarks