Shop OBEX P1 Docs P2 Docs Learn Events
Wireless Programming of a Propeller chip (video) — Parallax Forums

Wireless Programming of a Propeller chip (video)

Martin_HMartin_H Posts: 4,051
edited 2015-01-27 10:43 in Propeller 1
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.
«1

Comments

  • RaymanRayman Posts: 14,652
    edited 2012-04-18 18:43
    If you figured out how to program it wirelessly using the Prop tool, that's really something. I don't think I've seen anybody do that yet...

    My own plan is to try to use a Bluetooth module that brings out DTR. Don't know if that will work yet though..
  • jazzedjazzed Posts: 11,803
    edited 2012-04-18 18:52
    Rayman wrote: »
    If you figured out how to program it wirelessly using the Prop tool, that's really something. I don't think I've seen anybody do that yet...

    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.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-18 18:55
    Rayman wrote: »
    If you figured out how to program it wirelessly using the Prop tool, that's really something. I don't think I've seen anybody do that yet...

    My own plan is to try to use a Bluetooth module that brings out DTR. Don't know if that will work yet though..

    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.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-04-18 20:40
    Very cool! And I just happened to score some Wixel goodness when Pololu had their Black Friday sale last year!!

    Thanks, Martin!
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-01 18:11
    Hello,

    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 :D) 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?
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-01 19:34
    A few things I can think of.

    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.
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-01 20:30
    I did what you said and set the correct baud rate (115200).

    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!
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-01 20:34
    Actually, an interesting note (and I have no idea what this means), but the Prop is not recognized by the Prop Tool when connected via USB while my arduino_dtr line is connected in the way I described above to the Propeller's RESn pin.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-01 20:44
    That is the correct serial app. I am using a ceramic 0.1 uf capacitor so I am not sure which way a polarized capacitor would go. But the Propeller's reset pin needs to be high to not be held in reset, so I suspect that you might need to turn the capacitor around.

    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.
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-02 16:28
    Martin,

    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!
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-02 16:54
    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?

    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.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-02 18:02
    Here's a close up of the breadboard with the two Wixels and the propeller on a M44D40+ module (WBA Consulting's surface mount Propeller with EEPROM and crystal in one unit).

    WixelAndProp.jpg


    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.
    1024 x 768 - 94K
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-02 19:46
    Ok, I will go and grab a ceramic cap from my local store tomorrow.

    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!
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-03 04:44
    Can I ask why you've chosen to power the Wixel with 5V, differently than 3.3V?

    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.
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-03 12:22
    Ok, so I have the correct cap in now, and it seems to be giving me the correct logic. The dtr line is held high until before the handshake tries to go through and then it is pulsed low for roughly .34ms. I am also getting a handshake signal out of the wixel going into the prop, but nothing in return.

    The I/O pins I am using on the prop are P0 and P1, should I be using others?
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-03 12:46
    Glad to hear the new cap is doing the trick. For serial programming of the propeller chip you need to use P30 (serial Tx to host) and P31 (serial Rx from host).
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-03 12:56
    Knowing which pins to use for communication did the trick!!

    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!
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-03 13:25
    Glad to hear it. You are now a wireless Propeller chip programming guru and can evangelize the technology to other forum members.
  • copacetic353copacetic353 Posts: 52
    edited 2012-05-03 13:35
    Absolutely!

    Again, thanks so much for helping!
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-05-03 20:02
    This is great Martin. Congratulations and thanks for posting :)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-03 20:24
    Yes, Thanks for posting this Martin.

    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.
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2012-05-03 23:33
    Martin, nice work, not sure how I missed this thread originally, but thanks for putting one of my M44D40+ modules to work. It looked like you were using one of my PowerTwigs to power it as well.

    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.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-04 06:16
    @all, thanks for the kind words.
    Martin, nice work, not sure how I missed this thread originally, but thanks for putting one of my M44D40+ modules to work. It looked like you were using one of my PowerTwigs to power it as well.

    That was indeed a power twig coupled with the M44D40+. Together they make it speedy to prototype any propeller based circuit.
    Duane Degn wrote: »
    I plan to submit my petition to join The Cult of the Wireless Prop. I hope the initiation ceremony isn't too painful.

    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.
  • T ChapT Chap Posts: 4,223
    edited 2012-05-04 09:06
    Very cool stuff Martin. Not sure if this was asked, but the question is what kind of range can you get before failures.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-04 09:44
    I haven't verified it, but Wixels are claimed to have a range of 50' under typical conditions. That will be more than enough for what I plan to use it for.
  • StefanL38StefanL38 Posts: 2,292
    edited 2012-05-08 12:02
    OK so I ordered two wixels to try it and had success.
    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

    w+gBmf8Xo6DKAAAAABJRU5ErkJggg==

    open the downloaded file wireless-serial-v1.3-shield.wxl
    DNiAkiCCIn8NpwDAkiCCI4IEEEQQROj9J0Mwv8wAAwD+kpKQEYvaDPgAAiEP+Hxy22xuUHlp8AAAAAElFTkSuQmCC

    set the baudrate to 115200
    w+gBmf8Xo6DKAAAAABJRU5ErkJggg==
    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
    joUv2P0j0LQAAAABJRU5ErkJggg==

    hm - got something with higher priority than this explanation.
    rest of the explaining will follow after finishing...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-08 12:56
    Stephen,

    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).
  • turbosupraturbosupra Posts: 1,088
    edited 2012-05-08 19:09
    This is awesome Martin.

    Thank you for the instructions Stefan, I will be ordering a wixel now.


    StefanL38 wrote: »
    OK so I ordered two wixels to try it and had success.
    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

    w+gBmf8Xo6DKAAAAABJRU5ErkJggg==

    open the downloaded file wireless-serial-v1.3-shield.wxl
    DNiAkiCCIn8NpwDAkiCCI4IEEEQQROj9J0Mwv8wAAwD+kpKQEYvaDPgAAiEP+Hxy22xuUHlp8AAAAAElFTkSuQmCC

    set the baudrate to 115200
    w+gBmf8Xo6DKAAAAABJRU5ErkJggg==
    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
    joUv2P0j0LQAAAABJRU5ErkJggg==

    hm - got something with higher priority than this explanation.
    rest of the explaining will follow after finishing...
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-09 12:44
    Stephen, glad you got it working.

    Duane, how goes the Wixel battle?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-09 13:45
    Martin_H wrote: »
    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.
Sign In or Register to comment.