16F877's PWM to output 38KHZ data to transmit?

INFRARED—Currently i’m using a PIC16F877 to create a pulsing(eg : 10101010) which receive from keypad to the IR transmitter to be transmitted. i wish to use the feature from the PIC16F877 which is PWM to create a carrier frequency 38KHZ to combine with my pulsing(10101010) to send the signal from IR transmiter to IR receiver 38KHZ. The attachment below is a simple coding to send data(10101010) without using PWM as output. CAN ANYONE HELP ME TO AMEND THE CODING IN ORDER TO OUTPUT FROM THE PIN PWM IN PIC16F877 TO CREATE A 38KHZ CARRIER FREQUENCY PLEASE!!!

list p=16f877,f=inhX32, x=off
include <p16f877.inc>

__CONFIG _CP_OFF & _PWRTE_ON & _XT_OSC & _WDT_OFF

ERRORLEVEL -302 ;Suppress bank warning

TMRO EQU 1
STATUS EQU 3
PORTA EQU 5
PORTB EQU 6
TRISA EQU 85H
TRISB EQU 86H
OPTION_R EQU 81H
ZEROBIT EQU 2
COUNT EQU H’0C’
TEMP EQU H’0D’

;----------------------------------

ORG 0X00
GOTO START

;SUBROUTINE SECTION----------------

;2.5mS SECOND DELAY
DELAY1 CLRF TMR0
LOOPA MOVF TMR0,W
SUBLW .1
BTFSS STATUS,ZEROBIT
GOTO LOOPA
RETLW 0

;5mS SECOND DELAY------------------
DELAY2 CLRF TMR0
LOOPB MOVF TMR0,W
SUBLW .3
BTFSS STATUS,ZEROBIT
GOTO LOOPB
RETLW 0

;7.5mS SECOND DELAY-----------------
DELAY3 CLRF TMR0
LOOPC MOVF TMR0,W
SUBLW .6
BTFSS STATUS,ZEROBIT
GOTO LOOPC
RETLW 0

;CONFIGURATION SECTION--------------

START BSF STATUS,5
MOVLW B’00011110’
MOVWF TRISA
MOVLW B’00000000’
MOVWF TRISB
CLRF TRISC
MOVLW B’00000010’
MOVWF OPTION_R

BCF STATUS,5
CLRF PORTA
CLRF PORTB
;PROGRAM STARTS NOW-----------------

BEGIN BTFSC PORTA,0
GOTO BEGIN
MOVLW B’10101010’
MOVWF TEMP

BCF PORTB,1
CALL DELAY1
BSF PORTB,1
CALL DELAY3

TESTA0 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,0
GOTO SETA0
GOTO CLRA0

SETA0 BSF PORTB,1
CALL DELAY2
GOTO TESTA1

CLRA0 BSF PORTB,1
CALL DELAY1

TESTA1 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,1
GOTO SETA1
GOTO CLRA1

SETA1 BSF PORTB,1
CALL DELAY2
GOTO TESTA2

CLRA1 BSF PORTB,1
CALL DELAY1

TESTA2 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,2
GOTO SETA2
GOTO CLRA2

SETA2 BSF PORTB,1
CALL DELAY2
GOTO TESTA3

CLRA2 BSF PORTB,1
CALL DELAY1

TESTA3 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,3
GOTO SETA3
GOTO CLRA3

SETA3 BSF PORTB,1
CALL DELAY2
GOTO TESTA4

CLRA3 BSF PORTB,1
CALL DELAY1

TESTA4 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,4
GOTO SETA4
GOTO CLRA4

SETA4 BSF PORTB,1
CALL DELAY2
GOTO TESTA5

CLRA4 BSF PORTB,1
CALL DELAY1

TESTA5 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,5
GOTO SETA5
GOTO CLRA5

SETA5 BSF PORTB,1
CALL DELAY2
GOTO TESTA6

CLRA5 BSF PORTB,1
CALL DELAY1

TESTA6 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,6
GOTO SETA6
GOTO CLRA6

SETA6 BSF PORTB,1
CALL DELAY2
GOTO TESTA7

CLRA6 BSF PORTB,1
CALL DELAY1

TESTA7 BCF PORTB,1
CALL DELAY1
BTFSC TEMP,7
GOTO SETA7
GOTO CLRA7

SETA7 BSF PORTB,1
CALL DELAY2
CLRF PORTB
GOTO BEGIN

CLRA7 BSF PORTB,1
CALL DELAY1
CLRF PORTB
GOTO BEGIN
END

Is there anyone can give me a helping hand???

thxssssss

Sorry but this forum is about the arduino board that uses a radically different processor

I can't believe i saw PIC assembler without warning , now my retinas are burned forever :) :)

massimo