Thanks - but even with the next renamed (cos next is a reserved word) it comes up with compilation errors cos there are 3 things on the timeout label where there should only be 2. The issue is, because it's a radio connection there is static whenever there is not a radio transmission, PBP sees this as potential data, and if not met by the qualifier then it just loops to the beginning of the command again - so long as it's seeing these pin fluctuations and doing this loop, it will not timeout.
I also figure that I can't use the ON INTERUPT command - because that only works when a PBP statement is complete and the SERIN command will never complete if it doesn't get a qualifier and gets RF staic noise through all the time.
BTW I forgot to mention the PIC I'm using is a PIC16F676
Bookmarks