Wireless Programming of a Propeller chip (video)
Martin_H
Posts: 4,051
With mild to moderate fiddling I was able to wirelessly program a Propeller chip using a Pololu Wixel. Basically I set the Wixel up to program an Arduino (which Pololu supports), but then added a 0.1 uF capacitor to the Wixel's Arduino_dtr output. This causes the propeller's reset line to pulse low which works perfectly. In the video the propeller is running a blink program, I then load a echo program which returns characters typed back to the user (over the wireless serial), then I reload the blink program.
Apologies for using the sketch jargon to describe a Spin program. I was working with the Arduino to test out the Wixel before I made this video and got that term stuck in my head.
Apologies for using the sketch jargon to describe a Spin program. I was working with the Arduino to test out the Wixel before I made this video and got that term stuck in my head.
Comments
My own plan is to try to use a Bluetooth module that brings out DTR. Don't know if that will work yet though..
It can work. I've done it before. Whether it can work for everyone is another question.
Nice work Martin_H.
Yes, this works with the Prop tool. The Wixels have a 50 foot range inside and 350 kbps data rate. So it's also good for wireless diagnostics and remote control. For some reason Bluetooth modules that support DTR are rare and I find the AT commands to set the baud rate hard to use.
Thanks jazzed.
Thanks, Martin!
I am fairly new to tinkering with the Propeller!
My PPDB arrived in the mail yesterday along with a couple of Wixels. Thankfully I have been able to send serial data (which was a stand up and cheer moment for me ) wirelessly to be received by the paired Wixel connected to my computer.
However, the whole reason I bought these little wireless modules is because of what I had seen in this thread, wireless programming! I tried doing what you had mentioned, putting a 0.1uF cap between the arduino_dtr and the Props RESn but when I try to identify the Prop with the Prop IDE, it is not found.
Is there something I am completely missing?
There are two wireless serial firmware programs for the Wixels. Make sure you use the one for the Arduino as that supports the pulse to Arduino_dtr.
Make sure you configure the Wixels baud rate to 115200 which is used by the Propeller chip for programming.
Arduino_dtr is the pin labeled P0_0 which should have the 0.1 cap between it and the Propeller's reset pin.
Keep me posted as I can, always post a high resolution pictures of my breadboard so you can see the wiring. Vice versa of course as I might see something wrong.
I am not absolutely sure I have the correct firmware program, but is this the correct one? http://www.pololu.com/catalog/product/2500/resources
I believe I have the dtr line set up correctly, just to be hugely redundant because my breadboard is a bit of a mess right now due to other components also being on the board, I'll explain EXACTLY how I have it set up.
Jumper going from P0_0 (the fourth pin from the top left corner) to the NEGATIVE side of a 0.1uF Electrolytic Cap, jumper from the POSITIVE side of the cap going into the Propeller's RESn pin.
If you could include some photos that would be fantastic, I don't at this time have a way of getting photos onto my computer...
Thank you so much for your help and time!
Not seeing the Propeller chip from the IDE using USB that worked before often means of the Propeller is held in reset. This would match the capacitor being the issue. It is late on the East Coast, so I won't be able to post pictures tonight, but likely tomorrow. Keep me posted.
I tried a couple of different things with the dtr line and using my logic analyzer here is what I have found (being redundant here):
Without the 0.1uF cap on the dtr line, the line is held low which, from what I read from you, must mean that the Prop will be held in reset. However, with the cap on the line, the pin is constantly held high, which keeps it from being reset.
Doesn't the prop need to have that line brought low to reset the prop momentarily? I am not seeing that with the analyzer.
I do not know the identification protocol, but how is the computer supposed to recognize the prop? How is it recognized over USB?
Thank you so much!
With the capacitor the Arduino_dtr side of the capacitor should be low and the Propeller's side high. This is because the Propeller has a pull up resistor. When the Arduino_dtr goes high then low it should momentarily pull the Propeller side of the capacitor low. This was discussed in this thread http://forums.parallax.com/showthread.php?139519-How-does-a-capacitor-on-pin-2-of-an-FTDI-chip-do-the-reset
When the Propeller comes out of reset it initiates a handshake over the serial link with the programming environment. This is documented because a number of third parties have built IDE's for the Propeller. But I don't know the protocol.
I'm uncomfortable with the electrolytic capacitor because I am not sure how it impacts the ability to pull the pin low.
The Wixel to the far left is connected via USB to a computer. The Wixel in the middle is connected via Rx/Tx/Arduino_dtr to the M44D40+ with the blue 0.1 capacitor between Arduino_dtr and the reset line. The top power bus is 3.3 volts and the bottom is 5 volts with the supply lines color coded (red + and black for ground). You'll note that there is no connection between the Wixels as that is done via their on board radio.
Thank you so much for the picture!
Can I ask why you've chosen to power the Wixel with 5V, differently than 3.3V?
I really appreciate you helping me work this out, thank you!
I don't think it matters as the Wixels have an onboard 3.3 volt regulator, so I exactly copied the schematic from the Pololu documentation.
The I/O pins I am using on the prop are P0 and P1, should I be using others?
Interesting note, using a ceramic cap vs electrolytic makes no difference, I was just able to identify the Propeller wirelessly using a 0.1uF ceramic and also a 0.1uF electrolytic
Thanks a ton Martin!
Again, thanks so much for helping!
I ordered a few Wixels today. I plan to submit my petition to join The Cult of the Wireless Prop. I hope the initiation ceremony isn't too painful.
I will keep the Wixel in mind for a project that is on my project list. The napkin schematic currently shows an xBee solution, but the wixel is another contender I guess. The wireless portion of my project needs to be minimal cost but failsafe even though it is simple serial bits being transferred, so it will be researched further.
That was indeed a power twig coupled with the M44D40+. Together they make it speedy to prototype any propeller based circuit.
Being a young growth oriented cult, we're waving the initiation ceremony for a limited time only. But hurry this offer could expire at any moment.
I want to give a detailed description of the steps.
Download the pololu wixel configuration utility from here http://www.pololu.com/docs/0J46/3.a
it's called Wixel Windows Drivers and Software (12MB zip)
follow the installing instructions described on the website
Download the Wixel Shield app (25k wxl) from here http://www.pololu.com/docs/0J47/2.c
Start the pololu wixel configuration utility
oops pictures inserted directly into the edit-window get removed. OK I will come back later to upload them
open the downloaded file wireless-serial-v1.3-shield.wxl
set the baudrate to 115200
klick on write to wixel
Note if an wixel-app is already running on the wixel click Stop App to put the wixel in bootloader mode
then click write to wixel
you should get a report similar to this
20:59:03.906 : 64-E0-78-81 : Write to Wixel Erasing...
Writing...
Reading...
Wixel successfully verified.
Restarting device...
Wixel successfully written.
If you look into the devicemanager you sould see a virtual COM-port lke this
hm - got something with higher priority than this explanation.
rest of the explaining will follow after finishing...
I was just setting up my Wixels.
It's kind eery knowing someone in Germany was doing the exact same thing I was doing at about the exact same time.
The Prop Tool finds the Prop just fine. I still need to change the baud rate of my Propeller program in order to use the PST.exe.
I purchased four Wixels. I found I could use the two sets at the same time if I changed the channel of one set (I used 124 instead of the default 128).
Thank you for the instructions Stefan, I will be ordering a wixel now.
Duane, how goes the Wixel battle?
I'm pretty sure I was configuring mine at the same time Stephan was configuring his.
I'm gotten as far as "Propeller Found on COM28". This was through a pair of Wixels.
I ordered four Wixels, and I was able to use the second pair at the same time as the first pair by changing the channel the second pair were set to.
I haven't programmed any Props with them yet. I've been busy on a different project.