USB with FTDI chip
mynet43
Posts: 644
I've been using the FT232RL USB interface chip on my Propeller boards for a long time. I've read most of the threads about the reset and other problems with it. I now use the SN74LVC2G07 with it, to get reliable results.
I just ran across an article in the latest Electronic Design magazine, which showed me how little I really know about using this chip. It's written by a Senior Applications Engineer at FTDI. If you haven't read it, it's well worth your time. I can scan it and post it if anyone wants it.
Here are some of the things I didn't know about using the chip (I'll show my ignorance).
1. I was always confused about how much current you can use from the USB port. Some people say 500 ma, others say 100 ma. It turns out they are both right. You need to limit the current to 100 ma while the chip is enumerating (negotiating with the host USB). After that, you can use close to 500 ma per device.
2. You should use a 'soft start' circuit to delay the power output from the USB until it is fully connected to the host.
3. The DM and DP signals are a balanced signal pair. It's very important to keep the trace length of these two lines within 150 mils of each other, or the signal can be distorted. In my ignorance, I always thought these were just a pass thru for the TX and RX signals. Not so.
4. The DM and DP signals have a design impedance, 90 ohms between them and 45 ohms each to ground. These should be routed over a ground plane. Does anyone know the best way to get this impedance on a board layout?
5. If you're using the USB to power your board, you should have a ferrite bead and filter capacitor near the connector.
6. The chip has a built-in 3.3V regulator that you can use to power other devices when you're using USB power. Does anyone know how much power this can support?
These are just a few of the points in this excellent article.
I'd like to have a discussion on these and other points about the chip, so we can all get a better understanding of how to do it right.
Thanks for listening.
Jim
I just ran across an article in the latest Electronic Design magazine, which showed me how little I really know about using this chip. It's written by a Senior Applications Engineer at FTDI. If you haven't read it, it's well worth your time. I can scan it and post it if anyone wants it.
Here are some of the things I didn't know about using the chip (I'll show my ignorance).
1. I was always confused about how much current you can use from the USB port. Some people say 500 ma, others say 100 ma. It turns out they are both right. You need to limit the current to 100 ma while the chip is enumerating (negotiating with the host USB). After that, you can use close to 500 ma per device.
2. You should use a 'soft start' circuit to delay the power output from the USB until it is fully connected to the host.
3. The DM and DP signals are a balanced signal pair. It's very important to keep the trace length of these two lines within 150 mils of each other, or the signal can be distorted. In my ignorance, I always thought these were just a pass thru for the TX and RX signals. Not so.
4. The DM and DP signals have a design impedance, 90 ohms between them and 45 ohms each to ground. These should be routed over a ground plane. Does anyone know the best way to get this impedance on a board layout?
5. If you're using the USB to power your board, you should have a ferrite bead and filter capacitor near the connector.
6. The chip has a built-in 3.3V regulator that you can use to power other devices when you're using USB power. Does anyone know how much power this can support?
These are just a few of the points in this excellent article.
I'd like to have a discussion on these and other points about the chip, so we can all get a better understanding of how to do it right.
Thanks for listening.
Jim
Comments
The chip also has a enable# output that I use to achieve the soft start. It doesn't go low until after enumeration.
For more that 100 mA, you are technically supposed to use Mprog.exe to change the default configuration for high current.
(The chip tells the host how much current it needs)
But, I've never seen a computer complain with the default configuration.
Thanks for the info on board impedance. Is there a simple formula to calculate this? I've never bothered to think about it before, but it sounds like something that might be good for this chip.
@ Rayman,
I wasn't aware of the enable signal from the chip. I'll have to check it out. It seems strange, since the FTDI article recommends using a small mosfet circuit to do the 'soft start'. They tie the mosfet to the CBUS3 signal. Do you have an example of your 'enable' circuit?
Also, I've never heard of the mprog.exe you mentioned. But, like you said, I haven't had that problem either.
Thanks for the feedback, I'm already learning something.
Jim