Shop OBEX P1 Docs P2 Docs Learn Events
SPIN Problems Using Non-Parallax USB to TTL RS-232 Adapter. — Parallax Forums

SPIN Problems Using Non-Parallax USB to TTL RS-232 Adapter.

Duane C. JohnsonDuane C. Johnson Posts: 955
edited 2011-03-21 20:54 in Propeller 1
Why won't my Spin recognize my USB to RS-232 Adapter.
Its on COM6.
TeraTerm, my terminal emulator, recognizes it.
I can communicate with DongleBasic running in the propeller.

I like this adapter because it has extra power output pins for 3.3V and 5V.

Does Spin require us to use only their adapter? (I have the Parallax unit.)

Duane

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-03-17 15:43
    I believe has to do with the particular timings on the DTR line for the Propeller to program the Propeller.

    Some work, and some don't. I had a Belkin that I spent a day trying to get it to work, to no avail. But I have a Keyspan USA-19HS that lives with the Propeller swimmingly.

    Drivers I suppose.

    Why won't my Spin recognize my USB to RS-232 Adapter.
    Its on COM6.
    TeraTerm, my terminal emulator, recognizes it.
    I can communicate with DongleBasic running in the propeller.

    I like this adapter because it has extra power output pins for 3.3V and 5V.

    Does Spin require us to use only their adapter? (I have the Parallax unit.)

    Duane
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-03-17 16:13
    If you can communicate with DongleBasic but it won't program, then I agree with Publison - this sounds like the DTR line.

    We had some issues with this last year and Pullmoll did some very clever experiments with the timing of the pulses. The solution is to trigger on the negative rather than the positive edge. For the demo board, the solution was to swap an NPN transistor to a PNP transistor (we changed a BC547 to a BC557 but any small signal transistor will do). The dracblade board now has a BC557 and it seems to work well with a range of USB to serial adaptors, including a number of $1.99 ones from ebay.

    There is another solution but it involves changing the timing in the proptool, and in BST and in Homespun, and after some discussion, this solution was rejected as there were some other unintended consequences.

    There may be another solution changing values of the RC reset network, but it depends on which board you have.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-03-17 16:37
    Thanks, I thought it might be something like that.

    Duane
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-03-21 12:16
    I got this fixed on my Red USB/TTL adapters.
    These are quite plentiful on ebay and elsewhere for about $5.00us.
    And several variations.
    These are based on the Silabs CP2102.
    I really like this adapter because it supplies both 5V and 3.3V from
    the USB port.

    I have found that the RST, reset, pin is not compatible with SPIN.
    It represents a USB reset function.
    What we need is a pulsed low when the DTR line goes high.
    The CP2102 has this line, unconnected, on pin 28.

    I used a 2N7000 MOSFET to invert and create the low going pulse.
    Here is a crappy picture.
    USB-TTL_DTR-RST.jpg
    1. Remove the Via to the USB reset line on pin 9.
    2. Form the leads on the 2N7000 and solder GND and the DTR on the CP2102.
    3 Solder the .1uF capacitor between the smt resister and the 2N7000 Drain.
    4. Solder a 4.7 KOhm resister between +3.3V and the 2N7000 Drain.
    That's it.

    This works on several versions of my homemade PropSticks.
    Note! the pins are not in the same order as that of the Parallax unit
    so either make a special cable or connector gender changer.

    Have fun!

    Duane
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-03-21 20:54
    Great work Duane. Now another cheap USB interface / PropPlug :)
Sign In or Register to comment.