Can Parallax do something about the FTDI reset bug?
Kye
Posts: 2,200
So, I just finished up a robotic project for a fellow classmate, and when I took the programing cable out and started to run the device by itself it kept reseting over and over again.
I managed to fix it by disabling all the code involving serial data transfer. However, I would rather of not had to do that.
Now I know this issue has been brought up before. But can Parallax do an official review of the problem and publish a paper or something on how to avoid it?
I know the problem is not the propeller chip's fault but its not to my advantage or anyone else's advantage that this bug is only known about and the fix is·buried deep within these forums. Maybe at least there should be an official sticky on this so that everyone knows.
Thank you,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
I managed to fix it by disabling all the code involving serial data transfer. However, I would rather of not had to do that.
Now I know this issue has been brought up before. But can Parallax do an official review of the problem and publish a paper or something on how to avoid it?
I know the problem is not the propeller chip's fault but its not to my advantage or anyone else's advantage that this bug is only known about and the fix is·buried deep within these forums. Maybe at least there should be an official sticky on this so that everyone knows.
Thank you,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
More Info:
http://forums.parallax.com/showthread.php?p=651731
Post Edited (Bob Lawrence (VE1RLL)) : 10/12/2009 12:28:43 AM GMT
For Prop Plug users, of course, the solution is simpler: just unplug the USB cable and Prop Plug, instead of just the USB cable.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 10/12/2009 1:25:08 AM GMT
I've met Fred Dart from FTDI (one of the owners), having visited us before here in Rocklin in recent years. I'm aware of the problem, too, but may need a definitive explanation of the problem AND the solution before we start making requests.
Phil, can you brief me on the FULL solution you mention above so I'm making the right request to Fred?
Thanks,
Ken Gracey
Thanks for joining the discussion! Now I know we'll see some action!
The problem is this: When the USB cable is unplugged, a program that uses pin A30 for a serial output will assert that pin high after reset. This, in turn, will power the FTDI chip through its RXD input pin, which causes the DTR# output to rise, sending a reset back to the Prop. During reset, pin A30 tristates, and the FTDI chip loses power until the Prop comes out of reset again, starting the cycle all over. Putting a pullup on pin A30 "solves" the problem by keeping the FTDI chip powered during reset, thus preventing repeated edges on DTR#. But this is a poor solution, since it relies on the FTDI's internal protection diodes to keep it powered whenever the Prop is powered.
A better solution is to isolate the FTDI chip from the Prop circuitry using an open-drain buffer like the 74LVC2G07. This chip (and the entire LVC logic family) is capable of isolating independent supplies so the chip cannot power circuitry on either side from the other side's supply or input voltages. 'Best of all it's cheap. (It's used on the MoBoStamp-pe, BTW, for this very application.)
Here's a circuit (the "full solution") that can be used on a board that has both the FTDI chip and Prop:
Here's a circuit for an improved Prop Plug. It's not a "full" solution, though, since any Prop board that uses it needs to have pin A31 pulled up to Vdd:
Instead of the 74LVC2G07 on the Prop Plug, one could use a non-open-drain buffer (e.g. 74LVC2G34), which would solve the reset problem, but it would still allow a connected USB port to power the Prop through pin A31. It's better, as I pointed out above, just to unplug the Prop Plug when the USB connection isn't being used.
But for boards with both FTDI chip and Prop, a 74LVC2G07 buffer, along with a couple pullups, is the way to go.
BTW, this is not an FTDI problem, so I don't feel that they are responsible for providing a solution. Nor is it a Propeller issue, per se. It's just a more generic matter of how two independent circuits should be interfaced when only one is being powered.
Thanks,
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 10/12/2009 4:12:58 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
That, too, would work; but you would need second set going in the other direction to keep a powered FTDI chip from trying to power the Prop, which is another issue. The SOT 74LVC logic family has the additional advantage of 5V-tolerant inputs when powered from 3.3V — not an issue with Prop circuits, certainly, but a motivation for using it on the MoBoStamp-pe. The '2G07 buffer I recommended costs less than 11 cents on a full reel.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
However, on my TriBlade I have the circuit which includes the 2 x 150R t/hole series resistors. I suspect this is typical of many/most t/hole designs.
I presume the power is being supplied to the FTDI and therefore only via the SO (P30) pin of the prop. Surely, it is not the power being supplied to the prop as that is already powered???
If this is so, firstly, we only need to worry about the SO P30 pin. Most likely a high value resistor in this line would work. Alternately, a diode in place of the 150R series resistor, cathode to P30, and a pullup on the FTDI RX pin would work - that is, we make P30 an open drain style output but without the requirement for a software modification. Either of these would most likely be the easiest and simplest circuit modification.
I will draw a circuit and add to this post shortly.
Phil: I think the same problem will exist with the '07 buffer -(it is open drain)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 10/12/2009 4:02:56 AM GMT
Here a tutorial that explains TI's 74LVC "ioff" circuitry.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 10/12/2009 2:51:54 AM GMT
Obviously my post crossed Peter's etc. But we have the same thoughts.
Anyway, here is my recommended circuit. The resistor is the simplest and will most likely work. A diode·(1N914 or 1N4148) and pullup resistor (10K) would be second choice.
BTW - I have not seen any problems with the reverse situation - powering the prop from the FT chip and this I do all the time as I don not disconnect the USB when depowering my TriBlade.
Phil is probably correct - the shield of the USB should not be connected as this is the slave end, and only one end of a shield should be connected to avoid ground loops.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 10/12/2009 4:06:49 AM GMT
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
-Phil
-Phil
But for new designs your idea Phil is a good way to go.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I am loathe to use a hard to get component and difficult to use for a hobbyist cure. They are plentiful from Digikey. For a complete smt pcb, such as Peter, others and myself use, this is not a problem. In fact I am using SOT23 and SM8/UM8 etc parts on RamBlade which includes the LCV1G & 2G parts.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Sometimes it takes a simple question to get some matter out on the table for further discussion. Phil's little chip is cheap and small and so I may just use his idea for some circuits that might have problems. For 11 cents or whatever I'll put it in anyway.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I think you are talking about the same issue I spoke about some time ago, I have made a small PCB to solve this issue ( at least for me) , essentially its a prop plug with additional circuitry ( an analog switch) for the reset line. refer to schematic.
This device works for me, I can plug & unplug the USB Cable without the PROP Resetting. ( once activated)
I can send data via serial/usb to a MAC or PC
I can program the PROP as normal.
The only catch is you need another I/O pin to ENABLE /DISABLE programming ( i.e resetting)
By default my PCB acts as a normal prop plug, to take advantage of the new feature you need to set the I/O pin to disable programming via CODE.
So if you wish to re-program you need something in your prop device/app ( menu selection,button ect) to allow the user to ENABLE/DISABLE PROGRAMMING.
I have use a IP67/68 rated USB Connector for panel mounting and a micro-match connector for attaching to the main PROP Board.
As I said. This works for me.
regards
Dave M
So does anyone have any comments about my USB PCB or schematic? Excuse the upside-down pics
As I said it solve the re-setting issue for me.
Thanks
Dave M
Would another 74LVC2G07 need to be used when implementing the "rts" and "cts" pins on the FTDI ic?
That would be my recommendation, yes.
-Phil
-Phil
True. It has that other mis-feature.