Propeller Tool to Propeller via XBee
EricR
Posts: 35
I would like to eliminate the cord for Propeller Programming. I wanted to use two XBee transceivers for this. Does this sound technically feasible? Collecting data via the link while program is running would also be nice.
On the PC end, I think the Propeller Tool requires a real or virtual com port. I'm hoping a USB or Serial Development Board could work here.
On the Propeller end, the XBee® 802.15.4 (Series 1) has a 3.3V serial UART. I hope that could interface where the Prop Plug connects. Perhaps it could plug right onto the Education Kit board (see "2 ch PWM.JPG").
Has anybody done this? Any suggestions?
These are the development kits available from Digi. I'm not sure if they have all necessary software for setting up the XBee transceivers.
$129 XBee 802.15.4 (Formerly Series 1) Starter Development Kit
has 2 low power transceivers, 2 dev boards, one Serial, one USB
$179 XBee-PRO 802.15.4 (Formerly Series 1) Starter Development Kit
has 2 high power transceivers, 2 dev boards
$399 Drop-in Networking Professional Development Kit http://www.digi.com/products/wirelessdropinnetworking/dinprodevkit.jsp
has 5 transceivers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
On the PC end, I think the Propeller Tool requires a real or virtual com port. I'm hoping a USB or Serial Development Board could work here.
On the Propeller end, the XBee® 802.15.4 (Series 1) has a 3.3V serial UART. I hope that could interface where the Prop Plug connects. Perhaps it could plug right onto the Education Kit board (see "2 ch PWM.JPG").
Has anybody done this? Any suggestions?
These are the development kits available from Digi. I'm not sure if they have all necessary software for setting up the XBee transceivers.
$129 XBee 802.15.4 (Formerly Series 1) Starter Development Kit
has 2 low power transceivers, 2 dev boards, one Serial, one USB
$179 XBee-PRO 802.15.4 (Formerly Series 1) Starter Development Kit
has 2 high power transceivers, 2 dev boards
$399 Drop-in Networking Professional Development Kit http://www.digi.com/products/wirelessdropinnetworking/dinprodevkit.jsp
has 5 transceivers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
Comments
If you're willing to provide your own downloader, there have been implementations of XMODEM and, I think, YMODEM protocols in Spin. It wouldn't be hard to do KERMIT and any of these would work well for wireless downloading.
An xBee link for data works fine. BoeBotBasic (from the Object Exchange) has an option to use xBee for its "console" and that works fine.
Thank you. I hadn't thought about the packet timing issue. That makes total sense.
I'm not sure what a downloader is. For the downloader, would I need to make binaries from the Propeller Tool, then send those over the XBee? Then at the Propeller chip end, the XBee is programmed as a downloader?
Eric
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
You need a program to run on the Propeller that's always there that takes care of receiving another program via the RF link and writing it to EEPROM somewhere other than the 32K used for the download program. If the download program is small enough, you can use the rest of the 32K as a buffer for the downloaded program. It's best to use a 64K or larger EEPROM rather than the minimum of 32K needed for the Propeller.
There's a loader that's part of FemtoBasic that will load and run a program from an EEPROM area other than the 1st 32K
I might make the PWM program (part of a robot) look for certain data from the xBee that says 'go run the download program now'. So, in Hyperterminal on the PC, I could type "getprogram" and then the Propeller is waiting for Kermit to download a file.
I'm programming in Spin and assembly now and loving it. I'll should look into what the FemtoBasic is about so I can extract the dowloader, or launch a Femto Basic program to do the download.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
http://www.selmaware.com/appbee/home.htm
I don't know why the XBee uses a 2mm spacing, it sees incompatible with anything I ever use.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
I wrote a Spin implementation of Kermit.· This is very limited Kermit, it just gets one file, that's it.· See attachment "KermitGet - Archive· [noparse][[/noparse]Date 2008.11.20· Time 03.46].zip".· It's a demo program, not a proper object, so I did not put it in the Object Forum.· This was tested on a Demo Board, via the USB cable.· The sending application was the "HyperTerminal" that comes with Win XP.· It works fine this way.
My next step will be to try some input pins other than 30, 31 via an XBee module.· I got a pair of these in Digi's $129 XBee 802.15.4 (Formerly Series 1) Starter Development Kit ($99 on sale).· I also got a couple of the Sparkfun Xbee breakout boards, with connectors, that Simon suggested.· I plan to test this on the Demo Board also.
I also attached a screen shot of the VGA monitor that shows the results of a Kermit file get.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I use the XBee's all the time and they are great. In fact I use them with more than one kind of microcontroller (but mainly SX). Here is some advice for using XBee modems:
1) Buy the $129 802.15.4 kit for testing and use. You can buy two XBee pros additionally and end up with 4 modules (2-1mW and 2-60mW) for just a little more than buying the development kit for the pro version. The development kit is nice because it comes a USB board, Serial board and a loopback connector. If you don't need that though, you can just buy two modules, You don't actually need to have a developer kit, its just nice for interfacing w/ a PC.
2) Sparkfun has breakout boards and sockets for the narrower spaced pins.
3) Use the AT transparent mode. Its probably sufficient for most needs, only use packet mode if you really know what you are doing.]
4) Make sure you are buying new modules. The version A (pre dec 2007) modules can't upgrade to the newest firmware (buying from company should be fine)
5) 802.15.4 is the best way to go most of the time. Using zigbee or digimesh seriously impairs transmission speeds (by a factor of 100 sometimes), but you can always download different firmware to change with mode you use as the 802.15.4 and digimesh modules are the same hardware w/ different firmaware
6) These go nice with SX chips that can run at 3.3V optionally and I assume they would be great with propeller as they are 3.3V native.
7) The XBee PRO modules are a LOT better. Not only are they more powerful, but they have a more sensitive receiver and are especially necessary if you are doing any indoor application at all.
Hope this helps!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thomas Talbot, MD
Gunpowder, MD, USA
Thanks for your encouragement.
Invento-O-Doc,·
I did get the kit you mentioned, only better, it is on sale!· I got it from Digi directly, but I think it may have the old A version modules, the "IC ID" is 4214A-XBEE.· See photograph.· Yes, this is much more cost effective than paying $300 + for un-needed 5 dev boards if you want to develop ZigBee.· I am playing around with baud rates and will try the hardware flow control.· It's working pretty well in transparent mode.
T Chapman,
So far, the plain XBee is working well to the fartheset corner of my apartment in the range test.· Even to my car outside, about 100 feet away.· My plan is to write directly to EEPROM first, like F11.· Then (much harder), with an all Assembly version, to RAM directly, then launch the Spin interpreter.
Shanghai_fool,
I think Bluetooth is in the same un licensed band, but a totally different protocol.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
Post Edited (EricR) : 11/24/2008 1:09:22 PM GMT
Bluetooth will work as a terminal at 110,200 baud but the proptool does not recognize it and there is no remote reset.
Range testing at 3 feet shows 700 cps (characters per second) using XBee transparent mode, and 400 cps at 40 feet.· This is indoors with a few walls passed through, still with the lower powered plain XBee.· Baud rate is 57,600.· This is based on receiving a 6K .JPG file.· I find that sending "eeprom" and "binary" files takes about the same time for small programs.· This is because Kermit has RLE (run length encoding) compression.
I still did not actually save to EEPROM or RAM yet!· I refined the monitor display with annotation, and now have the Kermit receive program able to receive multiple files.· Next up is to change the program a Kermit receive object that is actually useful.
Included in the archcive is a slightly improved 'FullDuplexSerial' called "FullDuplexSerial128".· It has a 128 byte buffer and fixes a 1ms error in the receive timeout routine.· Also, it has a receive timeout routine with microseconds units for those who are really impatient .
The picture, "Xbee On Prop 57600.JPG", shows the result of receiving a small file with characters 0 to 50 hex.· The program is archived in "Kermit_XBee - Archive· [noparse][[/noparse]Date 2008.12.23· Time 05.20].zip".· Some test files to send from Hyperterminal are also included in the archive zip.
Eric Ratliff
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
permits the locomotive to discern which cars are on the same rail as the locomotive. After sequencing the cars from the GPS data, a "wakeup" packet will be sent to the cars to boot the PC104 system to access the higher level capability (anglecock, cutlever, handbrakes). I'm going to run the RS232 at 9600 bps as currently envisioned.
I'm hoping Digi will "fix" the DigiMesh to work with the RS232 board in the near future. It was a disappointment to find it non-functional in 8003. The mesh capability is something I really need down the road when a train grows to upwards of 200 cars.
Perhaps a neighbor's or my WiFi is interfering. Sometimes this low power module pair has trouble 20 feet away in my Kitchen, through a wall and some cabinets. Turning power off and back on will sometimes help this. I think I will be trying the Pro version for more power. It might also be a polarization issue, now the robot's antenna is horizontal, while the fixed central antenna is vertical. It always works in the same room at 10 feet, with perhaps just one character missing out of each 200 transmitted.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric