RF Modems with BS2p
bdrew7
Posts: 38
I am attempting to communicate with a BS2p24 on a Basic Stamp Super Carrier Board with two Digi International 9xTend 900 mHz modems. The modems have data in and data out. There are no control pins available on the modems.
How should I handle the ATN pin on the BS2p?
Is it possible to insert the rf modems in the serial port lines to communicate and download programs from the Stamp editor?
Thanks.
Bernard
Post Edited (bdrew7) : 7/24/2009 12:18:24 PM GMT
How should I handle the ATN pin on the BS2p?
Is it possible to insert the rf modems in the serial port lines to communicate and download programs from the Stamp editor?
Thanks.
Bernard
Post Edited (bdrew7) : 7/24/2009 12:18:24 PM GMT
Comments
1:· You'll get a better response if you put a subject line on your post (edit).
2:· It depends on your application, but if you are using the Digi product to communicate between two BS2's of any flavor, you can use the SERIN and SEROUT commands, with one i/o pin each (not the SIN, SOUT and ATN pins) connected to the Data In and Data Outs.· Unless you are trying to program the BS2's via RF...???
I use the Digi XBee PRO XSC's a lot now (just ordered another 5 of 'em).· I'm using them with BS2sx's quite well... not sure how much difference there is in comm requirements between your units and the XSC.· I hope this may prove helpful, let me know if I can add more.
Best,
Dave
Post Edited (xanatos) : 7/24/2009 2:28:19 AM GMT
Yes, I need to be able to program and monitor the BS2p program flow via rf. Hopefully this is not wishful thinking.
The system is in an autonomous boat that can be quite a distance out on the water during the testing phase. Take a look at http://springboatauv.blogspot.com
I will investigate the XBee Pro and see how that is done.
Again thanks for your help.
Bernard
If you will need to actually program the BS2 (as opposed to just issuing commands which the BS2 will respond to) then you'll need to use the SIN, SOUT and ATN pins as you suspect. I'm curious though as to why you would need to actually change the programming in the chip during the units deployment? I use the BS2SX a lot and can issue commands that will allow me to direct the system to run programs in different slots (it can hold 8 different programs and switch between them with shared variables).
MAybe if I understood a little bit more about what you are actually wanting to do programattically I could give you more helpful info.
If you weren't needing to change the program code resident in the BS2, the XBee PRO XSC is simplicity itself for communications. The XSC is limited to 9600 baud, but for most applications this is more than sufficient. The only thing you need to provide is a small voltage divider on the BS2 SEROUT pin (the XBee RX pin) to convert the levels from the 5V BS2 to the 3.3V XBee (I use a 1.5k and 3.3k). The only other connections *required* on the XBee are +3V3 and ground. There are two other connections you may wish to make - LEDs to show transmit, receive, etc., but if you are making an autonomous vehicle, the LEDs might be unnecessary and not using them can save battery life.
Sounds like a fun project!
Dave
Also, the rf link would allow me to download new coordinates or commands to retrieve the boat without an accompaning chase boat, if a failure of some sort is encounterd during testing.
BS2p slots are used for the program.· I divided the different tasks between slots, such as navigation, motor control, initialization and debug message generation.· Common memory and the uFPU coprocessor handle passing variable values between slots.
Thanks.
Bernard
Bernard
One solution, which has been used commercially in a now discontinued product, is to use a communications processor with enough of its own memory to hold a complete program. There's a utility program on the PC that transfers the program (which has been saved from the Stamp Editor as a file) using some kind of error-correcting packetized protocol like Kermit to the communications processor's memory using a program in that. Once the entire program is transferred, the communications processor programs the Stamp just like it was a PC. The protocol is publicly documented.
Another solution again involves saving the program to a file on the PC and having a communications program on the PC that transfers the program packet by packet over the RF link. In this case, there's a program running on the Stamp itself that receives each packet (using scratchpad RAM as the buffer), decodes the packet, and writes the packet's contents to one of the other "slots" of EEPROM (other than slot zero where this program is kept). Once the entire program is downloaded, the download program can do a RUN statement and transfer control to the downloaded slot.
A third solution would be to just transfer the new coordinates or commands via the RF link. You'd never change the program itself via the RF link.
ATN is connected to the DTR RS232 signal and you can make up a serial cable with this not connected.
Thanks for the help.
Bernard
http://selmaware.com/appbee/AppBee_Doc.PDF
I did, when I started using XBees.
Thanks.
Bernard