I'm passing data in RS232 format by 433MHz radio modules.
All is working OK but I need some advice on handling lost communications.
My code is:
SERIN2 RXPin,16780,200,Lost_Signal,[WAIT("!"),HEX2 My_Data]
And it works OK from PIC to PIC by wire:
1. Unless RXPin changes from the idle state in 200mS, the code at Lost_Signal will execute.
2. The data always starts with ! so the transmitter and receiver get synchronised.
3. The transmitter repeats it's message every 50mS so the receiver will
wait until 4 messages have been missed before executing Lost_Signal.
However, it does not work when passed by radio:
1. The receiver, even when the transmitter is turned off, receives noise.
2. The noise causes the code to leave the idle state.
3. But the ! is not received because the transmitter is off.
4. The receiver is supposed to work like this.
I'm using a PIC877 and think I need a 'background clock' and some interrupt routine? Can I use TIMER0, TIMER1 or TIMER2 - or are these used by the PBP is the SERIN commands?
Any advice please
Regards Bill Legge
Bookmarks