PDA

View Full Version : 433 Mhz Wireless Serial



posterboy
02-26-2005, 10:44 AM
Hello,
I am new to wireless serial programming. I am currently trying to connect a robot to a base station of sorts by using RF digital's 433Mhz Wireless serial transcievers. I have consulted both the provided data sheet, and the Basic stamp command refrence, yet I can not seem to find the correct baud mode setting. As of now I have had no luck getting anything close to communication between my two stamps (bs2p24, and bs2p40) Can you please look over my source code (for one way communication only), and tell me what I am doing wrong?
Thanks
SourceCode:


For Recieving:

baud VAR WORD
baud = 1021
INPUT 10
stuf VAR BYTE
DEBUG "go"

REc:
SERIN 10,baud,[stuf]
DEBUG DEC stuf
PAUSE 20
GOTO Rec


For Transmitting:

LOW 10
PAUSE 1000
trans:

SEROUT 14,baud, [DEC 1]
PAUSE 1000
GOTO trans
submit1=Submit Form

kb2hap
02-26-2005, 02:33 PM
Make sure you using the proper baud into the transmitter (seems ok)

is it all wired properly

your code was a little messy sort of a mix between bs1 and bs2. you should really check out the PBasic help file or the Basic stamp manual.

http://www.parallax.com/dl/docs/prod/stamps/basicstampman.pdf

try something like this:


baud·con 1021
stuf VAR BYTE
DEBUG "go"

REc:
SERIN 10,baud,500,REc,[stuf] ' this will after a 500ms delay if nothing is received go back to REc

DEBUG ?·stuf
PAUSE 20
GOTO REc

trans:

SEROUT 14,baud, ["1"] 'if you were only trying to send a 1 else you may want to use a variable


PAUSE 1000
GOTO trans

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ

kelvin james
02-26-2005, 03:01 PM
After a quick look at the specs, you need 9600 baud. 1021 is for 2400 baud, plus it looks like it has to inverted, so 16624 is probably the number you are looking for. Check the serialout table in the help for bsp. And as shown in previous post, set baud as a constant, no need to use a variable.
kelvin

posterboy
02-27-2005, 01:49 AM
Thanks for the help. I rewrote the my sorce code with the changes you suggested. However, I still can not get anything. I have triple checked all the wiring, and can find nothing wrong with it. Do you have any other ideas?

kb2hap
02-27-2005, 05:35 AM
could you post a pic or schematic?

and post your code

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ

Briefmark
02-27-2005, 01:27 PM
Posterboy, I recently wired up a test RF link, and I found a simple test program at http://www.rentron.com/Stamp_RF.htm·· This was written for a BS1 and BS2, so you will have to use the correct baud rate constants for N2400 (non interted 2400 baud) for your particular stamps.· One easy check of the programs is to bypass the RF link and simply take the output signal from the stamp transmitting, and connect it directly to the input pin of the receiving stamp. Oh yes, you need to connect a ground wire between the two stamp grounds too.· Once this is working, then connect up the RF link.· I found that while they say to use 13" wire antenna, I could not get much distance between the xmtr and rcvr.· I took off the antennas and it worked great without any antennas!

Hope this helps--Fred

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

kelvin james
02-28-2005, 02:14 AM
I had originally assumed you had model 27988 which is 9600 baud, if you have the 27997 which is 2400 baud, try 17405 ( 2400 inverted for a bsp)as your baud rate. You can even try 18447, which is 1200 baud and is recommended by the manufacturer. 2400 baud is the MAXIMUM rate it will operate at.
kelvin

posterboy
03-03-2005, 04:16 AM
Hey again,
I tried to connect thee two stamps using only a wire instead of the wirelesss module, however, the recieving stamp (Bs2p24) still only reports "0" as the incoming serial data even though "1" is being transmitted. I tried connecting a LED to the line, and it blinks brightly when the transmitter is transmitting, however, still nothing on the stamp.

Thanks always for your help