Data Streaming to XCite RF Modem BS2 Stamp
Jadencccp
Posts: 3
Here is basically what I'm trying to do:
In a subroutine I would like to transfer an 10bit (8 bit data, start/stop bit) at 2400 baud to an rsXXX module.· I have had no success thus far and am the mercy of the forum users.· Basically I would very much appreciate some sample code for the subroutine to transfer 0101010111.· The rsXXX module will then make it so the XCite can handle the data, if I'm not mistaken.
Any help is greatly appreciated.· Thank you!
-Alex Moore
In a subroutine I would like to transfer an 10bit (8 bit data, start/stop bit) at 2400 baud to an rsXXX module.· I have had no success thus far and am the mercy of the forum users.· Basically I would very much appreciate some sample code for the subroutine to transfer 0101010111.· The rsXXX module will then make it so the XCite can handle the data, if I'm not mistaken.
Any help is greatly appreciated.· Thank you!
-Alex Moore
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
SEROUT 1, 16780, [noparse][[/noparse]"HELLO", CR]
SEROUT 1, 16780, [noparse][[/noparse]"Num = ", DEC 100]
To make sure, "HELLO" will be sent from pin 1 to the rs232 then to the XCite modem. I did not know it was this easy.
Now that you've seen how simple RS-232 serial communication is, you may be interested in seeing how that same asynchronous serial output can be dumped right into an Excel spreadsheet! Check out StampDAQ, a FREE utility from Parallax:
http://www.parallax.com/html_pages/downloads/software/software_stampDAQ.asp
If, instead, direct graphical plotting is more your game, there's always StampPlot Lite, and StampPlot Pro. The Lite version (which is probably all you need to test out your system) is also FREE! Here it is, FREE for the asking:
http://www.parallax.com/html_pages/downloads/software/stamp_plot_pro_info.asp
I'll bet you think that's all there is? Nope!
The excellent text "Applied Sensors" (formerly "Earth Measurements") by Dr. Tracy Allen, a regular contributor to this Stamp Forum, covers many aspects of logging data from various input sensors using the PBASIC Stamp as the data collector. This informative text is just a part of the Educational Series available from Parallax. That too is FREE for the download, from here:
http://www.parallax.com/detail.asp?product_id=28153 (near bottom of page)
Insofar as the outbound data transmission is concerned, here are the various RF offerings (including BlueTooth) available from Parallax. If you want near-guaranteed reliability, I would choose one of these products, as opposed to some product that hasn't been tested fully with the PBASIC Stamp:
http://www.parallax.com/html_pages/products/communication/rf_modules.asp
In the end, how you choose to do this, is certainly up to you. However, if this were my project, I'd be tempted to design something fairly straightforward and reliable like this:
/code
sensor-
········· ·\
sensor--->--> Stamp [noparse][[/noparse]SEROUT] -->/ RF LINK /--> [noparse][[/noparse]SERIN]·Stamp --> PC: Running·StampDAQ or StampPlot
·········· /
sensor-
code/
I would "protect" my data by using and transmitting a 16-bit CRC along with any sensor data sent. If reliability over cost is a goal, I'd make the RF link bi-directional, and use a simple,· home-brew ACK/NAK protocal, which then would allow the immediate re-transmission of faulty data, on the fly. If power consumption is not an issue, then I'd look to use the Stamp BS-2SX and probably shoot for a transmission rate of 9600 baud to start. Once that was solid, I might trying bringing up the data transmission rate some, to improve the data throughput, if that's an issue at all.
Just some thoughts and resources.
Regards,
Bruce Bates
Take care Bruce.
Alex Moore