PDA

View Full Version : On-PCB FTDI problems



Bobb Fwed
05-26-2010, 11:51 PM
So I have put the FTDI circuit on my PCB and I am having an issue with it.

The rest of my project works great (the FTDI is on a removable board, along with some other components -- pictured). So i am able to program and test the propeller separate from the FTDI chip. I programmed the propeller to output some information.

As for the problem:
The USB connects to FTDI chip just fine (it installs drivers). But the propeller won't program. The information (previously programed) outputs just fine to PST (through the USB). On the reset pin, the correct reset spike can be seen when I try to program (or detect). The RX line (P31) seems a little fuzzy on the oscilloscope, but the TX pin (P30) appears to reply with data (if I apply a pull-up resistor on the line -- if not is stays at 0V). But still "no propeller chip found".

When I try to bypass the FTDI using the IO1 port (on right of schematic) the RX pin (P31) seems to try to send data, but it never goes above 1/2 Vdd, thus nothing is actually sent, and a pull-up resistor does nothing to help that. The highest it goes is about 1/3 Vdd.

Any ideas?

Information about the attachments:
IMG00019-20100525-1644 -- a photo of the board itself. There's not a whole lot that can be figured from that.
FTDI-schematic -- the schematic I used. Note that it is only the FTDI circuit; note the addition of the SN74LVC2G07DBVR component to prevent the propeller being reset while the USB is unplugged -- this was suggested in an old post, I will try to find it.

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

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

bill190
05-27-2010, 12:02 AM
Might check the DTR / Reset to be sure it is doing what it should.

From the Propeller manual...

"Reset (active low). When low, resets the Propeller chip: all cogs disabled and I/O pins floating. Propeller restarts 50 ms after RESn transitions from low to high."

Rayman
05-27-2010, 12:02 AM
Both of your 74lvc2g07 open-drain outputs need pull-up resistors...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm

Phil Pilgrim (PhiPi)
05-27-2010, 12:16 AM
Ditto the pullup comment. I'm glad to see someone using the 74LVC2G07 in this context. It's much more preferable, however, to power VCCIO and the LVC buffer IC from the FT232R's 3V3 output than from the Prop side. Doing so will prevent the Prop from powering a disconnected USB chip through the pullup. Each pullup should go to the supply associated with that side's receive pin. Here's the schematic:

http://forums.parallax.com/attachment.php?attachmentid=57861

-Phil

Post Edited (Phil Pilgrim (PhiPi)) : 5/26/2010 5:21:01 PM GMT

bill190
05-27-2010, 12:36 AM
Also just to note (Ignore this unless all else fails), serial signals (RS-232) can be "inverted" or "not inverted". That is -voltage is "on". Or +voltage is "on". Might want to double check the signals coming out of the FTDI via the data sheet to be sure they are what the Propeller is wanting to see.

Phil Pilgrim (PhiPi)
05-27-2010, 12:40 AM
The signal polarity is correct. No problems there.

-Phil

T Chap
05-27-2010, 12:44 AM
Besides the above, what you have labeled as PropRx is in reality at the Prop is P30 Tx right?

Bobb Fwed
05-27-2010, 01:32 AM
Rayman AND Phil said...
Both of your 74lvc2g07 open-drain outputs need pull-up resistors...


Attached is my "Version 2" of the FTDI circuit. Is that better? I have fixed the current circuit board by placing a pull up resistor on the PropRX line. I based my original thing on the attached (white) schematic, which does not show such a resistor. I had actually almost put one, but decided whoever made the white schematic knew better than I.


@Todd Chapman - yes, the whole thing is kind of confusing, that's why I was mentioning the pin number as well, but I guess since I say "PropRX"/"PropTX" it would make more sense if I were talking about the transmitting and receiving as the Prop sees it, so I have changed it just for you! The wiring was all correct, just the labeling was obfuscated.

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

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

Phil Pilgrim (PhiPi)
05-27-2010, 02:03 AM
Bobb,

Your new schematic looks better. BTW, the reason my Buffered Prop Plug schematic does not show the pullup on the Prop side is that it has to be on the host board, not the Prop Plug. (The Prop Plug itself does not have access to the Prop's Vdd.)

Also, don't count too much on the +5V from the PC being a full five volts. It could be as low as 4.3V, and that's before the drop though your Schottky diode. Strictly speaking, you should include a soft-start circuit to power any additional external circuitry from the USB port, although many people seem to get by without one.

-Phil

T Chap
05-27-2010, 02:18 AM
Bob, it would help in cases like this to post a clear image of both boards so that connections can be visually traced out.

I assume you have already ruled out the FTDI driver version.

Post Edited (Todd Chapman) : 5/26/2010 7:23:00 PM GMT

Martin Hodge
05-27-2010, 09:16 AM
Would it help to connect the FTDI RESET# line to VCC?

Phil Pilgrim (PhiPi)
05-27-2010, 09:58 AM
No, it's not necessary.

-Phil

T Chap
05-27-2010, 10:08 AM
Maybe connect VCC and GND and see what happens. That is probably whats missing. :)

Post Edited (Todd Chapman) : 5/27/2010 3:13:30 AM GMT

Martin Hodge
05-27-2010, 10:55 AM
Dismissive or smarta** remarks not withstanding, I think it would be a good idea to do it anyway.

From the datasheet:


Active low reset pin. This can be used by an external device to reset the
FT232R. If not required can be left unconnected, or pulled up to VCC.

T Chap
05-27-2010, 11:00 AM
I was more making fun of my prior comments, if that helps. But is industry standard to leave it alone.

Martin Hodge
05-27-2010, 11:10 AM
I think "industry standard" is dubious, but I'll yield on this one.

Phil Pilgrim (PhiPi)
05-27-2010, 12:14 PM
Martin,

'Sorry if I sounded dismissive; I didn't mean to. I netted your unintentional red herring on the fly while busy with something else, and my main concern was to unhook, filet and flash-freeze it before it flopped into the OP's lap, thus adding to his anxiety. http://forums.parallax.com/images/smilies/smile.gif

-Phil

Bobb Fwed
05-28-2010, 02:52 AM
So how'bout the soft-start circuit. Any suggestions on how to make one?

I think the schottky may be enough. It is not my main source of power, it is an in-case-the-power-is-out supply. The schottky is only a 270mV (@30mA) forward drop, so worst case about 4V would be supplied to the LDO regulator I have. What are the chances that after the regulator at least 2.6V isn't being supplied (I won't run the device off of it, I just need to program the device with it)? A soft-start would save me all of 150mV or 200mV (but still may be worth it for more consistent programability)?

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

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

Post Edited (Bobb Fwed) : 5/27/2010 8:00:10 PM GMT

Phil Pilgrim (PhiPi)
05-28-2010, 03:40 AM
Bobb,

Take a look at the soft start circuit I used on the MoBoStamp-pe (#28300). The schematic is at the end of the PDF. BTW, the soft-start circuit recommended by FTDI is totally worthless. Here's a forum discussion on the topic:

http://forums.parallax.com/showthread.php?p=699564

-Phil

Bobb Fwed
05-28-2010, 04:52 AM
What actually creates the soft start? I am guessing it the combination of CT, RT, C2, D1, D2, and R1? (from page 5 of http://focus.ti.com/lit/an/slva156/slva156.pdf).

Seems like a lot of circuitry for a simple function. Wouldn't there be a simple transistor method for doing a similar thing (with a cap and a couple resistors)? --That is, to slow the sudden hunger of my 3.3V circuit, not to regulate it.

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

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

Post Edited (Bobb Fwed) : 5/27/2010 9:57:16 PM GMT

Phil Pilgrim (PhiPi)
05-28-2010, 04:59 AM
That soft start circuit relies on using the FB pin of the TI voltage regulator. The one I used was derived from the PMOS transistor circuit on page 2.

-Phil

Bobb Fwed
05-28-2010, 05:47 AM
So maybe something like this (attached).

I still need the schottky because at some point (most of the time) the 5-ishVOut will be supplied with 12V to 13V. But at least this will save the ?USB? when my 3.3V capacitors get turned loose.

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

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

Phil Pilgrim (PhiPi)
05-28-2010, 06:05 AM
That's certainly an improvement over no soft-start at all. Although, it doesn't satisfy the requirement that the full load not be applied until the FTDI chip has been enumerated, it should still limit inrush current. My recommendation is to breadboard it and try it. (It helps to use a scope for stuff like this.)

-Phil

Bobb Fwed
05-28-2010, 11:15 PM
Another try (attached).

The problem with trying to breadboard this stuff is that the FTDI chip is SMD-only component.

Edit: image with component values.

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

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

Post Edited (Bobb Fwed) : 6/2/2010 10:27:28 PM GMT

JackBak
05-28-2010, 11:54 PM
Bobb,

For testing purposes how about the Sparkfun FTDI break-out-board?

www.sparkfun.com/commerce/product_info.php?products_id=718 (http://www.sparkfun.com/commerce/product_info.php?products_id=718)

-Jack

Phil Pilgrim (PhiPi)
05-28-2010, 11:59 PM
Bobb Fwed said...
The problem with trying to breadboard this stuff is that the FTDI chip is SMD-only component.

Tell me about it. The current MoBo is based on version Q of the proto layouts. It took that many layouts (and nearly that many proto PCBs) and hours with an o'scope to get the FTDI stuff right.

My recommendation would be to copy the softstart circuit used on the MoBo that takes advantage of a Microchip supervisor chip to overcome the FT232R's startup glitches. It's virtually bombproof in that a dead short on the downstream side will not cause the FT232R to reset. It will just reset the supervisor and begin the softstart process over again. (You need to include the 75 ohm resistor and electrolytic cap on the FT's supply to provide some additional filtering and holdup time.) The only downside I've come across is a limitation on how much capacitance it can charge. It won't handle a 1000uF electrolytic, for example, without continuously resetting itself.

-Phil

T Chap
05-29-2010, 12:01 AM
Bob if you want I will drop you this bare board in the mail. You can hack the other parts on pretty easily. PM an address if interested.

Post Edited (Todd Chapman) : 5/28/2010 5:09:55 PM GMT

Bobb Fwed
06-11-2010, 12:19 AM
Are the SLEEP# and PWREN# pins I/O's, open drains, or what? If they are powered high, is that at IOVCC voltage or VCC? I am hoping they are open drain, anyone know?

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

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

desiko
06-13-2010, 02:07 AM
Bobb:

This is from a footnote in the FT232R data sheet

When used in Input Mode, the input pins are pulled to VCCIO via internal 200k
resistors. These pins can be programmed to gently pull low during USB suspend
(PWREN# = “1”) by setting an option in the internal EEPROM.


regards,

desiko

Bobb Fwed
06-13-2010, 05:18 AM
I don't think they are in input mode. They appear to be outputs (by default). Am I wrong?

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

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

desiko
06-14-2010, 08:29 PM
You are right. They are outputs by default.

I am interested in this question also so I contacted FTDI.
This is the response from an applications Engineer:

"They act as open collector until the configuration has been read, then they drive totem pole."


desiko

Bobb Fwed
06-14-2010, 10:54 PM
I don't remember exactly what totem drive is. If I remember correctly it still contains an open drain transistor, but can also output a (somewhat week) logic high, but if higher voltage (higher than the primary circuit) is applied to the output, it is not affected because of a diode. But do these outputs have a protection diode to prevent higher voltages from being supplied? Are these diodes tied to IOVCC or VCC?

I am making a circuit to control 5V flow into my project, so open-drain is the easiest to work with. Will 5V (current limited) on these outputs be a problem if I have the IOVCC at 3.3V?

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

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

Phil Pilgrim (PhiPi)
06-14-2010, 11:20 PM
A "totem pole" drive is one that contains both PMOS and NMOS transistors to drive the pin both high and low.

The FT232R's I/O pins are, indeed, tied to VCCIO via a diode. This is the reason the chip can be powered through those pins (unfortunately). Calling it a "protection" diode, though, is a gross overstatement in the face of a +5V drive. It's more to protect the chip against transient static charges. A constant overvoltage input can induce excessive current in the diode, possibly harming the chip.

-Phil

Bobb Fwed
06-14-2010, 11:51 PM
Rightio. So they just turn into bi-directional outputs? Isn't that so much easier to understand than "totem pole"? I will have to revise my circuit. Thanks for the help guys.

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

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

Phil Pilgrim (PhiPi)
06-15-2010, 12:16 AM
No, not "bidirectional outputs". "Bidirectional" means "input and output", so "bidirectional output" is a contradiction in terms. "Totem pole" is the correct terminology. It comes from the fact that the source driver is stacked on top of the sink driver in the schematic of the chip.

-Phil

Bobb Fwed
06-15-2010, 12:33 AM
Duh, I knew that. So is the propeller bi-directional with a totem output (when the IO is set as an output)? Or are there other source/sink output schemes?

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

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

Phil Pilgrim (PhiPi)
06-15-2010, 01:05 AM
DIRA controls directionality. When a pin's corresponding DIRA bit is set to "1" it's a totem pole output; when "0", an input. You can simulate an open drain output by setting the OUTA bit to zero and toggling the DIRA bit high (for a low output) and low (for an "open output", i.e. an input). Typically, an open drain output (whether real or simulated) will have an external pullup resistor to keep the pin from floating.

-Phil

hover1
06-15-2010, 01:10 AM
TI likes to use the term bidirectional when refering to Totem Pole output on such items as the SN754410, although they do refer to it as bidirectional drive current:

The SN754410 is a quadruple high-current half-H driver designed to provide bidirectional drive currents up to 1 A at voltages from 4.5 V to 36 V.
The device is designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage
loads in positive-supply applications. All inputs are compatible with TTL-and low-level CMOS logic. Each output (Y) is a complete totem-pole driver
with a Darlington transistor sink and a pseudo-Darlington source.


http://focus.ti.com/lit/ds/symlink/sn754410.pdf
I guess the term "Totem Pole" has been in my vocabulary since the 70's, so I never give it a second thought.
Jim

Phil Pilgrim (PhiPi)
06-15-2010, 02:31 AM
Yes, but they're using the term "bidirectional" to explicitly modify the phrase "drive currents" rather than in reference to the pin itself. That particular usage is non-ambiguous. The pin, in that case, is not bidirectional.

-Phil

hover1
06-15-2010, 03:04 AM
Of course, Phil, you are correct in the particular usage of the term in the data sheet. I was just pointing out that it might be confusing to the casual ,(newbie) observer.

WE know what it means. http://forums.parallax.com/images/smilies/tongue.gif Jim


Phil Pilgrim (PhiPi) said...
Yes, but they're using the term "bidirectional" to explicitly modify the phrase "drive currents" rather than in reference to the pin itself. That particular usage is non-ambiguous. The pin, in that case, is not bidirectional.

-Phil