what's the error ?
this is code by using "proton ide lite "
basic language
to Rc5
receiver the signals from philips remote "RC0764"
the code
Device = 16F628A
RC5IN_PIN = PORTA.0 ' Choose the port and pin for the infrared sensor
Dim RC5_WORD As Word ' Create a WORD variable to receive the data
Dim RC5_DATA As RC5_WORD.LowByte ' Alias the COMMAND byte to RC5_WORD low byte
Dim RC5_ADDRESS As RC5_WORD.HighByte ' Alias the COMMAND byte to RC5_WORD high byte
TRISA.0=$ff
TRISA.1=$00
TRISA.2=$00
TRISA.3=$00
TRISA.4=$00
TRISA.5=$00
TRISA.6=$00
TRISA.7=$00
TRISB=$00
ALL_DIGITAL = On ' Make all pins digital mode
While 1 = 1 ' Create an infinite loop
Repeat
RC5_ADDRESS =%11100000
RC5_WORD = RC5In ' Receive a signal from the infrared sensor
If RC5_DATA = %00000001 Then PORTB.0=1
ElseIf RC5_DATA =$01 Then PORTB.1=1
ElseIf RC5_DATA =$02 Then PORTB.2=1
ElseIf RC5_DATA =$03 Then PORTB.3 = 1
ElseIf RC5_DATA =$04 Then PORTB.4 =1
ElseIf RC5_DATA =$05 Then PORTB.5=1
ElseIf RC5_DATA =$06 Then PORTB.6=1
ElseIf RC5_DATA =$07 Then PORTB.7=1
ElseIf RC5_DATA =$08 Then PORTA.1=1
ElseIf RC5_DATA =$09 Then PORTA.2=1
ElseIf RC5_DATA=$10 Then PORTA.3=1
ElseIf RC5_DATA=$11 Then PORTA.4=1
ElseIf RC5_DATA =$20 Then PORTA.5 =1
ElseIf RC5_DATA =$21 Then PORTA.6 =1
EndIf
Until RC5_DATA<> 255 ' Keep looking until a valid header found
Wend