Shop OBEX P1 Docs P2 Docs Learn Events
Programming Prop via FTDI and 4-pin header [SOLVED] — Parallax Forums

Programming Prop via FTDI and 4-pin header [SOLVED]

Bobb FwedBobb Fwed Posts: 1,119
edited 2010-07-21 16:28 in Propeller 1
Similar subjects from me have come up in recent days, but I pose another odd question.

Attached is the wiring I am using. My problem is, once the FTDI chip (or possibly the SN74LVC2G07DBVR chip -- U8 -- I haven't tested which, maybe either one messes it up) is attached, the 4-pin header port doesn't work with the prop plug. You may be saying (in your head hopefully), "Hey dummy! Unplug the Prop Plug USB cord and plug into the on-board USB!"

Well, the answer to your silent question is, "I don't intend to use the Prop Plug." What I actually am wanting to do is to program the propeller via USB and alternatively from another Propeller (thus no USB cable available). So the question is, can the wiring be modified (on the receiving end or the transmitting end) to program the propeller using the standard header while keeping the FTDI functional?

I am wide open to other alternatives. I.E. completely different wiring schemes; program Prop B from a USB driver on Prop A (is this possible?); anything else you geniuses may propose is welcome.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!

Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!

Post Edited (Bobb Fwed) : 7/21/2010 4:30:46 PM GMT
1287 x 1099 - 170K

Comments

  • AribaAriba Posts: 2,690
    edited 2010-07-16 21:56
    What is the value of R20?
    (a schematic with component values would make it easier to find the problem).

    Andy
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-16 22:11
    Basically, you have to have a jumper or something similar for the Propeller <- FTDI / Propeller <- 4-pin header because the FTDI (buffered) output is in parallel with the 4-pin header and they're likely to be in conflict. An SPDT jumper is the simplest solution. An alternative might be an SPDT analog switch or selector, maybe triggered by +5V power from the USB connection (unplug the USB cable to use the header).

    The Propeller transmit pin and the reset pin can go to both places since they're inputs for the transmit pin and the reset is open-drain / open-collector and two of those can be paralleled as long as the resting state is high (open)
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-16 22:11
    R20 is 220. But it doesn't look like it is necessary, I think it is a remnant of the wiring before the SN74LVC2G07DBVR chip (and only precautionary at that point).

    Schematic with values attached. Sorry about that.


    As for the "problem" I don't think it is a wiring problem or error, it is more so a conundrum, where the Prop needs to be able to receive programming commands from two different sources.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
    1182 x 1098 - 176K
  • AribaAriba Posts: 2,690
    edited 2010-07-16 23:20
    Try it with a 2.2k ... 4.7kOhm resistor for R20.
    I think with such a series resistor and without something pluged in the 4 pin header, the FTDI will still be able to program the Prop.
    If you plug in a PropPlug or another Prop in the 4 pin header, this device will be dominant, because of the lower resistance.

    In case of a second Prop, it looks like the simplified attached schematic. You can program (or communicate with) the first Prop when the TXpin is an output and sends the serial data. Then when finished just make the TxPin an input, so the FTDI will be able to talk to the first Prop. As a benefit also the second Prop will be able to "hear" what the FTDI sends at his TXpin (as input).

    The Reset output of the second Prop should have a diode, or your code need to use the ResOut Pin in a open collector way (only output a Low, and make it an input for a High).

    Andy
    531 x 344 - 4K
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-20 22:07
    I was kind of able to test the suggestion Ariba gave.
    Attached is the schematic I ended up testing (an old version of the FTDI circuitry I already have a PCB made of).
    This is a SMT board, I didn't have anything except a 10K in the 0402 package to put in the R20 slot. The R60 resistor is on the opposite side of R20.
    What I was expecting was the FTDI wouldn't be able to program the Propeller, but the header would. What actually happened was nothing. USB still works, Prop Plug does not.
    I can see the FTDI still working with a tolerance or voltage difference between the two 10K resistors, but why doesn't the Prop Plug work?

    Does this tell you anything. Do you think a Prop-to-Prop program may be more successful than the Prop Plug?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
    1134 x 772 - 107K
  • AribaAriba Posts: 2,690
    edited 2010-07-20 23:36
    Remove R60.

    With R20 and R60 you will never have a Low at the PropRx Pin, only 1.65V or 3.3V. The Prop has a input threshold of ~1.45V so it never sees a Low.

    Andy
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-21 00:02
    The propeller has a threshold of about 1.65V...or more correctly: Vdd/2. But the divider that is being created (R20/R60) would only affect the signal coming from the FTDI right? And as I was saying, that is still working (if the one 10K is +2% and the other is -2%, it will just hit that threshold -- or am I thinking about this all backward? -- maybe the prop plug has a resistor that is screwing it up when this divider is included). I will try it without R60 tomorrow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
  • AribaAriba Posts: 2,690
    edited 2010-07-21 00:39
    Sorry for the confusion. It's not so easy to get your description right, because the PropPlug has also an FTDI and USB.

    Does your FTDI also work if you have the PropPlug connected (and powered)? This would be very strange.
    The difference between a PropPlug and a second Prop is that you can make the TX pin of the Prop and input (=highZ), with the PropPlug this is not possible.

    Andy
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-21 15:22
    Sorry, when I say "the FTDI" I mean the one in the schematic (i.e. the one on my circuit board, not the prop plug FTDI).

    So, now I have both the Prop Plug and my FTDI powered and plugged in, and both can program the propeller! As soon as I unplug the FTDI USB, the Prop Plug stops working. As soon as I unplug the USB from the Prop Plug, the FTDI stops working.

    I should probably breadboard a propeller to program this board and see if that works any differently.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-21 16:28
    And the propeller prevails! I hooked up a standalone propeller to program the propeller that has been giving me issues when trying to use the Prop Plug, and no problems. The FTDI works without the second propeller plugged in, and the Propeller can program the other with or without the FTDI being powered.

    EDIT: And even more lame (i.e. I should have tried the Prop-to-Prop thing a long time ago). The Propeller can program the other Propeller just fine with than 220 resistor in place (R20). I guess even with the SN74LVC2G07DBVR chip open collecting, the Propeller can provide enough juice to overcome 220-ohms of resistance (duh -- it's only a third of what the IO pin can output). So it is a bit wasteful, but it works with the 220. For my next version, I will likely put a 1K or 2.2K in place of R20.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!

    Post Edited (Bobb Fwed) : 7/21/2010 4:40:47 PM GMT
Sign In or Register to comment.