1. Where is <main>?
2. As I stated on post #8 you have to take specific steps.
a. Did you implement some sort of encoding? (Manchester or Bi-phase?)
b. Did you implement some sort of error detection (Checksum or CRC?)
c. If the transmission was not succesful, do you have any way to re-transmit the packet?
All of the above are documented on the forum. Use the google search tool that D. Taylor has offered to all (http://www.picbasic.co.uk/forum/showthread.php?t=4751).
Ioannis
Bookmarks