On wire everything is quite clear (hmm, not always, but anyway...).
But radiofrequency is another matter. The receiver has analog circuits that produce a analog replica of the pulses you transmit. If you want a pulse at the output of the receiver, then either you will connect a schmitt trigger or a more clever circuit called data slicer. The first will work only if the signal is at a standard level. The second will adjust the trigger level according to the signal strength. So if you are near the receiver (strong signal) the trigger level will be higher. If you move away from the receiver (weak signal) then the trigger level will fall. But not immediatly. There is a time constant (that's where the preamble is needed-to find the correct level).
There is no need to deal with squeltch or analog outputs of receivers since there are all the circuits included. Just connect your PIC at the data output of the receiver.
Also your bytes should not be a train of 1's or 0's because again in this case data slicer cannot be set correctly. So you need also a manchester encoding scheme. (See: http://www.picbasic.co.uk/forum/show...79&postcount=6 and also: http://www.picbasic.co.uk/forum/show...77&postcount=4 )
All these have been discussed in the forum.
It is a good practice to send a series of 4-5 $55 which is 01010101 in binary as preamble and after this a manchester encoded data bytes.
I would suggest also a CRC at the end if you can, to ensure data integrity.
Ioannis
Bookmarks