Programming a Prop with a generic USB to Serial converter?
Joel Rosenzweig
Posts: 52
I have a Prop based device that needs a firmware update. Unfortunately, the device is in France, and I'm not. The fellow in France does not have a Prop Plug, but he does have access to a generic USB to Serial converter that supports RX and TX, but not DTR. I'd like to know if there is a relatively simple way of connecting his generic converter to the Prop to program it.
The challenge I see is that the Prop Plug makes some use of the DTR signal, which this generic converter does not have. Furthermore, I don't know if the DTR signal is modulated during programming or not. I know that 2 minutes with an oscilloscope would answer that question about DTR modulation - I'm just unable to do that at the moment. If the signal is modulated, then it looks certain that this generic programmer won't be workable. If it's not modulated, then it would seem trivial to make it work.
Can it be done? If so, how?
If it's not possible to rig something up using this generic USB to Serial converter, I'll send him a Prop Plug or have him buy it locally. I just thought I'd try this route first before purchasing and shipping more hardware around the world.
Thanks guys.
Joel-
The challenge I see is that the Prop Plug makes some use of the DTR signal, which this generic converter does not have. Furthermore, I don't know if the DTR signal is modulated during programming or not. I know that 2 minutes with an oscilloscope would answer that question about DTR modulation - I'm just unable to do that at the moment. If the signal is modulated, then it looks certain that this generic programmer won't be workable. If it's not modulated, then it would seem trivial to make it work.
Can it be done? If so, how?
If it's not possible to rig something up using this generic USB to Serial converter, I'll send him a Prop Plug or have him buy it locally. I just thought I'd try this route first before purchasing and shipping more hardware around the world.
Thanks guys.
Joel-
Comments
* Press F8 to compile the source or load the eeprom file
* Show hex
* Load EEPROM or ALT-E and reset or power-up the Prop at the same time
If it fails to find the Prop then just try again with maybe a slight variation between the load and reset. This method has worked for me on various systems and sometimes it is a little tricky but at least it does the job. Next time you ship a Prop product you might include a Prop Plug [noparse]:)[/noparse]
*Peter*
Before I discovered that my USB to Serial converter also supports the DTS I programmed the Propeller by pressing the reset-button manually.
I pushed the reset button and held it. A short while before the PropTools tries to load the program to RAM I released the button. Depending on how good your timing is, it might fail from time to time, but it was not to anoying. So, if it's only for rare occasions, it'll do quite well.
Post Edited (MagIO2) : 4/27/2009 7:41:43 AM GMT
http://www.parallax.com/tabid/254/Default.aspx
The generic USB-to-SERIAL cable probably outputs RS232 voltage levels, so he'd have to use this circuit regardless for TX and RX, too, or else he might destroy the Prop chip. Alternatively, he could get the more functional USB-to-RS232 cable (with DTR/TX/RX) and find a MAX232 or similar chip, breadboard it, and get a quick n' dirty USB-to-RS232-to-3.3V logic converter chip. If he only has the TX and RX line, I might suggest a similar circuit here, with a manual reset of the Prop (if the board was equipped with a reset button of some kind): http://www.uchobby.com/index.php/2007/06/11/ttl-to-rs232-adaptor-explained/
If I recall correctly, when I've had to manually hit reset to program, I think I first hit the F7 key to "Identify Hardware..." ...
... I started out by hitting reset at the same time as hitting F7 to see if the prop was found, but a check of the o-scope revealed a slight delay from hitting F7 to seeing the reset line pulsing, so I increased my the delay from F7 to hitting the reset button until I find the correct timing... this timing was for me the same as for programming the chip (i.e.: hit F11 to load the eeprom and then hit the reset button).
Oh, and as for the reset line being modulated, I believe all it does is just go from logic high to logic low (for RS232, a negative voltage to a positive voltage, but this is level-shifted and inverted, plus RESn is active low logic), back to a logic high, followed by a slight delay (50 ms or so), followed by the Prop bootloader routine ... I believe this is documented in the Propeller datasheet (http://www.parallax.com/tabid/442/Default.aspx, version 1.2 of the prop datasheet on pages 5 and 6). This is why timing manually is kinda tricky--you have to bring the prop to reset and make sure that the prop boots up and goes through it's 50 ms delay and then hope that the bootloader detects the PC (or vice versa) in time for programming.
Post Edited (dwelve) : 4/27/2009 6:41:40 PM GMT
Thanks for everyone's input so far.
Joel-