I am not a fan of the technique (oft recommended here) of supposedly training the receiver with a series of $55 and/or $AA. It is difficult to distinguish these alternating bits from the random noise that is always present at the output of a superregenerative receiver. See...for an explanation.
Also see...for sample code that uses a different technique that really does a better job of what the other technique purports to do - train the receiver by setting its AGC and ATC levels without the need for the receiver to distinguish $55 from noise. For short data transfers, I prefer the NEC protocol given in the first examples. Scroll down to see SerOut2/SerIn2 examples. I only recommend the latter for longer data transfers (and manchester coding is useful here).
You might also find it worthwhile to actually see the receiver output which you can do by using your soundcard to record it and then a Wave editor to view it. See...
For short data transfers, I also recommend repeating each transmission 3-5 times. That way you can look for the lengthy start pulse on each pass through your main loop. If you get a pulse that's about half the full width, branch to the routine that receives the data. That way you do not need to block other activity by waitng for the start condition.
Bookmarks