It matters quite a bit which serial mode you use. Most RF transmitters need logic 0 on the
data input pin during idle periods to supress the RF carrier. A logic 1 turns ON the carrier.
A logic 0 turns it OFF. You want a logic 0 on the data inut during idle periods, so inverted
mode is for sure the way to go.
With PBP, DEBUG compiles to the least amount of code, so if you're not familiar with using
DEBUG, it's worth the effort to learn it.
The OT2400 mode returns the serial output pin to high impedance. I.E. it makes the TX pin
an input just after sending serial data. The T part means TRUE mode, which just means
data is transmitted in non-inverted logic. 1=high, 0=low.
ON2400 transmits in INVERTED mode, and leaves the TX pin as a high impedance input
once data is transmitted. I wouldn't use either of these with RF.
N2400, N9600, etc are best, but DEBUG is still one of the best options since it offers the
same data modifiers SEROUT2 does, but produces tighter code.
Serial communications with RF is really pretty easy once you get the hang of it. One of the
easiest ways is to just send the same data payload several times, compare each packet,
and if one or more doesn't match, just ignore it.
Send a long pulse to start. I.E. a 2mS high going pulse, follow it with a few bytes that are
an equal number of 1's and 0's, a synch byte (you can lock onto this with a WAIT option)
then follow-up with the data payload.
Bookmarks