mmm, sorry you rigth only for sony protocols. no RC5, well the only basic compiler is proton. Version 3.X, has RC5 fuction. Tested
Example
Device = 16F877
RC5IN_PIN = PORTC.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_COMMAND as RC5_WORD.Lowbyte ' Alias the COMMAND byte to RC5_WORD low byte
DIM RC5_SYSTEM as RC5_WORD.Highbyte ' Alias the COMMAND byte to RC5_WORD high byte
ALL_DIGITAL = ON ' Make all pins digital mode
Cls ' Clear the LCD
While 1 = 1 ' Create an infinite loop
Repeat
RC5_WORD = RC5In ' Receive a signal from the infrared sensor
Until RC5_COMMAND<> 255 ' Keep looking until a valid header found
Print at 1,1,"SYSTEM ",Dec RC5_SYSTEM," " ' Display the SYSTEM value
Print at 2,1,"COMMAND ",Dec RC5_COMMAND," " ' Display the COMMAND value
Wend




Bookmarks