Hi,
The Parallax example:
http://www.parallax.com/Portals/0/Do...ceive-v1.0.pdf
From page 6:
'===TX CODE ===========================
PULSOUT 8, 1200 'Sync pulse for the receiver
SEROUT 8, 16468, [ "!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE ]
'======================================
'===RX CODE ==========================
SERIN 7, 16468, [WAIT("!"), x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
'======================================
In the Parallax example, SERIN waits to receive an explanation mark "!".
This is called a "qualifier" in the PicBasic manual. If the character
received does not match the qualifier "!", the qualification process starts over.
Once the qualifier is satisfied, SERIN begins storing data in the variables
we have specified.
The synchronization pulse (PULSEOUT) triggers the qualification process of
SERIN and makes sure that SERIN will be ready to receive the next character
which is "!" in the Parallax example. With PULSEOUT we simulate a character
NULL. (NULL = Binary 0, inverted logic is used).
* * *
When a logic "1" is present on the DATA line and the PDN line is high, then
the power amplifier will be activated and the carrier frequency will be sent
to the antenna. When a logic "0" is present on the DATA line and the PDN line
is high, the power amplifier is deactivated and the carrier is fully suppressed.
When "Inverted logic" is used, then there is no RF carrier when the data line
is idle. Note that the inverted logic is not a must, but if you don't use it, the
code will be more complicated and you will have to use an I/O pin of the PIC
in order to control the PDN line of the transmitter.
Best regards,
Luciano
Bookmarks