©Parallax, Inc. • 433.92 MHz RF Transmitter and Receiver (#27980, #27981) • v1.0 1/06 Page 4 of 8
Module Dimensions
Transmitter (#27980) Receiver (#27981)
©Parallax, Inc. • 433.92 MHz RF Transmitter and Receiver (#27980, #27981) • v1.0 1/06 Page 5 of 8
Source Code
BASIC Stamp
®
1 Example Programs
The following BS1 programs will transmit (Tx) and receive (Rx) two word-sized counters (four bytes of
data). DATA lines on each module should be connected to I/O pin 1 of each of the BS1 modules. The 5v
and GND lines should be connected to a +5 v source (Vdd) and ground (Vss) respectively (for both Tx
and Rx). The BS1 on the receiving end should remain connected to the computer to view the DEBUG
statements.
TxCode_v_1.0.bs1
' TxCode_v_1.0.bs1
'{$STAMP BS1}
'{$PBASIC 1.0}
'
'Parallax 433.92 MHz RF Transmitter (#27980) Sample Tx Code (BS1)
'Connect I/O Pin 1 of the BS1 to the DATA line on the RF module
'Connect +5v (Vdd) to the 5v line, connect Ground (Vss) to the GND line
'This code will transmit two word sized counters, byte at a time.
'
'Note the PULSOUT instruction: this helps the receiver sync with
'the transmitter, especially after lapses in communication.
'This code transmits at 2400 baud, inverted.
SYMBOL x = W1
SYMBOL y = W2
Start:
PULSOUT 1, 300 'Sync pulse for the receiver
SEROUT 1, N2400, ("!", B3, B2, B5, B4)
PAUSE 100
x = x + 1
y = y + 1
PAUSE 150
GOTO Start
RxCode_v_1.0.bs1
'RxCode_v_1.0.bs1
'{$STAMP BS1}
'{$PBASIC 1.0}
'
'Parallax 433.92 MHz RF Receiver (#27981) Sample Rx Code (BS1)
'Connect I/O Pin 1 of the BS1 to the DATA line on the RF module
'Connect +5v (Vdd) to the 5v line, connect Ground (Vss) to the GND line
'This code will look for an "!", then read in four bytes.
'The first two bytes will be the high and low bytes of a word variable (x),
'the second two bytes will be the high and low bytes of a second word variable (y).
'The values of x and y will be sent out to the DEBUG terminal.
'This code receives at 2400 baud, inverted.
SYMBOL x = W1
SYMBOL y = W2
Start:
©Parallax, Inc. • 433.92 MHz RF Transmitter and Receiver (#27980, #27981) • v1.0 1/06 Page 6 of 8
SERIN 1, N2400, ("!"), B3, B2, B5, B4
DEBUG x, y
GOTO Start
BASIC Stamp
®
2 Example Programs
The following BS2 programs will transmit (Tx) and receive (Rx) two word-sized counters (four bytes of
data). DATA line on the transmitter should be connected to I/O pin P8 of the BS2. The DATA line on the
receiver should be connected to I/O pin P7 of another BS2. The 5v and GND lines should be connected
to a +5 v source (Vdd) and ground (Vss) respectively (for both Tx and Rx). The BS2 on the receiving
end should remain connected to the computer to view the DEBUG statements.
TxCode_v_1.0.bs2
' TxCode_v_1.0.bs2
'{$STAMP BS2}
'{$PBASIC 2.5}
'
'Parallax 433.92 MHz RF Receiver (#27981) Sample Tx Code (BS2)
'Connect Pin 8 of the BS2 to the DATA line on the RF module
'Connect +5v to the 5v line, connect Ground to the GND line
'This code will transmit two word sized counters, byte at a time.
'
'Note the PULSOUT instruction: this helps the receiver sync with
'the transmitter, especially after lapses in communication
'This code transmits at 9600 baud, inverted.
x VAR Word
y VAR Word
DO
PULSOUT 8, 1200 'Sync pulse for the receiver
SEROUT 8, 16468, [ "!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE ]
x = x + 1
y = y + 1
PAUSE 10
LOOP
RxCode_v_1.0.bs2
'RxCode_v_1.0.bs2
'{$STAMP BS2}
'{$PBASIC 2.5}
'Parallax 433.92 MHz RF Receiver (#27981) Sample Rx Code (BS2)
'Connect I/O Pin 7 of the BS2 to the DATA line on the RF module
'Connect +5v (Vdd) to the 5v line, connect Ground (Vss) to the GND line
'This code will look for an "!", then read in four bytes.
'The first two bytes will be the high and low bytes of a word variable (x),
'the second two bytes will be the high and low bytes of a second word variable (y).
'The values of x and y will be sent out to the DEBUG terminal.
'An optional LED (with proper current limiting resistor) may be connected to the
'BS2 I/O pin 0, this will blink when data is received.
'This code receives at 9600 baud, inverted.
x VAR Word
y VAR Word
DO

27980

Mfr. #:
Manufacturer:
Parallax
Description:
LS-1700 316 S.S., PTFE, N.C., 20 VA
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet