thanks for all the explaination. it really worked out apart from few small changes using diff PIC.
i really appretiate that.
now do u have any idea how to get the specific part from within a long string for example
if the original string is AAAA+BBBB+CCCC+DDDD+EEEE
and from that string i want to take out only CCCC.
I have used the PWM in PIC16F72. You may have to sightly modify for the PIC18.
It generates a 38khz for IR communication as carrier frequency.
#pragma CLOCK_FREQ 20000000 // config clock to 20mhz.