Hi,

As you mentioned most of the time your radio receiver would be idle (receiving nothing). Your intention is to get out of the serial in routine when you are getting "junk" due to the random switching of the receiver output. The code I posted can just do that for you. The SERIN can jump to a label when nothing is received in the input (the input pin remains idle). So most of the time you will get "characters" due to the receiver throtlling around the noise floor. Just validate your character manually and reset your timer_counter if it is something you expect. Say you are expecting a "R". Get the character from serin first to a byte variable then check if the byte="R" and increment another pointer to check for an "E" next. If not you can let your timer_counter roll. Also you can use a 5 byte FIFO buffer to make things easy. In the FIFO you will always have the last 5 bytes received and validation becomes easier.

You can also use the RSSI as per the datasheet to guide your PIC when to grab a data. It releives you of the software headache.

Give the receiver side code or whatever you are transmitting. I shall try to find some time to give you an example