Then you have a problem.
If you have a Carrier-Detect signal from your RF module, you can AND that with the input going to the SERIN pin like a pseudo 'Squelch' control. This will solve some of the problem BUT it will be at a cost of Range and introduce a few other problems which for brevity I'll skip at this time. It is not a full proper solution but it's easy for those that don't know better.
Everyone feeds the output of the RF module straight into a PIC and expects results. This is not the professional way to go. SERIN does a lot for those that can't do it for themselves, but there are limitations - and you've just come across one of them.
With Radio, a single noise spike in the wrong place can easily destroy a complete data packet (or prevent a timeout) and it is therefore unwise to try to use SERIN (or for that matter the Hardware UART) directly. Just because everyone uses this method, or details it in their applications books, does not mean it is the correct way to go. It is NOT. It is very very amateurish and no true professional would subscribe to this method of use.
The best method is to take multiple samples of each bit period and reconstruct the data by majority decision. This will handle noise spikes and also the 'jitter' that you get as receivers are operated at the extremes of range. Using this method you get reliability under adverse noise conditions, an extended range far beyond what is achieved using other methods and a controlled timeout. So basically, don't use SERIN, HSERIN, DEBUGIN or whatever, and write your own routine to do what I've just described above.
Melanie
Bookmarks