BASIC Stamp Code to SX
Hello,
I am working·on a wireless project in which I want to wirelessly send data from my BASIC Stamp to my SX28AC/DP chip.· Here is the website where I bought the transmitter and reciever and found the code:· http://www.rentron.com/Stamp_RF.htm
Transmitter:
Reciever:
I want to convert the Receiver Code to my SX chip.· Does anybody have any ideas?
Thanks for your help!
-Andrew
I am working·on a wireless project in which I want to wirelessly send data from my BASIC Stamp to my SX28AC/DP chip.· Here is the website where I bought the transmitter and reciever and found the code:· http://www.rentron.com/Stamp_RF.htm
Transmitter:
The BS1 Code:
symbol dat = b2symbol synch = b3symbol junk = b4synch = "A"junk = 126start[noparse]:p[/noparse]ause 1000for dat = 1 to 255 serout 0,N2400,(junk,synch,dat) pause 50next serout 0,N2400,(junk,synch,0) goto start
Reciever:
The Receiver Code:
' RF test program' This test program is for the RF receiver.' The serial input routine waits until the' letter "A" is received before processing' further incoming serial data. This method' allows us to synchronize the receiver to' the transmitter, and avoid false receptionsSYNCH CON "A" 'Establish synchronization byteBAUD CON 16780 'N2400 baud (MAX)DAT VAR byte 'Data storage variableDIRH = %11111111 'All outputsSTART: SERIN 0,BAUD,[noparse][[/noparse]WAIT(SYNCH),DAT] OUTH = dat GOTO START
I want to convert the Receiver Code to my SX chip.· Does anybody have any ideas?
Thanks for your help!
-Andrew
Comments
Post Edited (JonnyMac) : 9/7/2007 9:09:49 PM GMT
You need one of these: http://www.parallax.com/detail.asp?product_id=250-04050
Jon·specified in your code that this frequency would be used.
Ken Gracey
Parallax, Inc.
http://www.parallax.com/sx/resonators.asp
Ken Gracey
Post Edited (ajajack) : 9/7/2007 9:29:54 PM GMT
If you are using the SX Tech Board then put it into the socket as shown on page 17 of the following document http://www.parallax.com/dl/docs/prod/sx/SXKeyMan2_0.pdf.
Page 147 of the same document shows the schematic for this board, which also shows you how to connect the resonator to your SX chip.
As for the code conversion of the second program, there's nearly enough hints in the example Jon provided to translate the second program.
Ken Gracey