Go Down

Topic: FT232RL to Atmega UART - is this correct? (Read 5128 times) previous topic - next topic

Graynomad

Yep.

Also be aware that your Tx pin may actually power up the FTDI chip depending on how it is constructed. IE if the FT232 has ESD protection diodes a logic high on the FT chip's Rx can try to power up the chip.

I don't know if this is the case with this chip, but I've just designed it into something in a similar way to what you are doing and I've added some circuitry to stop that.

The other thing to do is make sure your processor's Tx pin is tristate when the USB is not plugged in, if you can know that.

_______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

jtw11

Quote
Also be aware that your Tx pin may actually power up the FTDI chip depending on how it is constructed.


That's not a problem - I'm not sleeping the '232 - just leaving it powered up the whole time.

Quote
The other thing to do is make sure your processor's Tx pin is tristate when the USB is not plugged in, if you can know that.


Why is this? Do both RX & TX go high when USB is unplugged? I know previously I've seen 1k series resistors on the RX and TX lines, but I believe the 232RL has internal series resistors?

Graynomad

Quote
both RX & TX go high when USB is unplugged?

It's the TX of the processors that is a problem. It will happily power the 232 IF it has ESD diodes (I don't know if it does or not). On the Arduinos I assume the 1k resistors pretty much solves the problem.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

I always thought the 1Ks were to limit the FT232 to 5mA of drive current and to let the Arduino or external devices overdrive that if the pins were used for other purposes.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Graynomad

Yes I think that is the case, I suppose a nice side affect may be that when the USB is not plugged in it helps with the above issue, if indeed it is an issue with this particular chip, I know it is with most.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

jtw11

#20
Nov 13, 2012, 05:42 pm Last Edit: Nov 13, 2012, 05:47 pm by jtw11 Reason: 1
What however do you mean by power the chip? Surely, having the chip powered is not an issue - unless it's in a tiny battery powered application?

Or are you saying that without series resistors, that when the TX pin 'powers' the '232, that doing so draws excessive current from the AVRs TX pin?

I have just searched the 232RL datasheet for the keywords 'ESD' & 'diode'.... no returns.

EDIT: Hang on, just a thought - now I'm completely lost. The TX pin of the processor goes to the RX pin on the '232, not the power supply pins, so how is this 'powering' happening?

Graynomad

#21
Nov 13, 2012, 06:13 pm Last Edit: Nov 13, 2012, 06:21 pm by Graynomad Reason: 1
If a pin has ESD diodes they are connected internally to VCC. So you have a path from the pin to VCC through a diode. Therefore if you apply 5v to the pin you will get ~4.5v on VCC and the chip will happily work.

As you say unless you have a battery-powered system the extra current probably doesn't matter, but it's generally considered bad form to power a chip like this. It may draw too much from the AVR pin although with modern chips probably not and anyway the diode would blow first I think.

But there are other issues, the chip is running with nothing plugged into some of its inputs so they are floating, That's never good.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

retrolefty

Note that the standard Seeeduino arduino board has it's FTDI chip powered only by the USB power bus and the rest of the board has a manual power bus switch to select from either the on-board +5vdc regulator or USB for the boards Vcc bus. This means if your not using the USB channel that there is no current being wasted by the FTDI chip. They use the same two series 1k ohm 'isolation' resistors between the arduino send and rec pins and the FTDI rec and send pins. This isolation works fine at preventing any damage to the FTDI chip when running on arduino external power but not plugged into a PC.

Lefty

jtw11

Okay, I understand now, thanks. I'll take a look into this, and how the old Duemillinovae boards had them wired up. Certainly the datasheet dosen't mention anything about it. I may also just swap my supply over to be powered by USB.

CrossRoads

You only get 500mA from USB, I don't if that's a concern.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jtw11


You only get 500mA from USB, I don't if that's a concern.


Yep, I meant just to power the '232 chip, the rest of the board will still be powered by it's own regulated supply.

Brad Burleson


I see, the datasheet shows no pull up on the reset line to 5V, and the pin descriptor says it is not required - leave unconnected or pulled up to 5V. However - I shall trust your experience.


Regarding pullups on Reset, check out AVR042 "AVR Hardware Design Considerations" (http://www.atmel.com/Images/doc2521.pdf)

Regards,

Brad
KF7FER

jtw11

Just had a quick flick through the document referenced - I will have a proper read when I have time, but very useful indeed - thank you.

I see there's some bits in there re ESD diodes, series resistors on SPI pins (answered a question I was going to ask), and some good info about separating AVcc using a ferrite bead.

Also good info on how the decoupling I've always done, and how others do it - isn't quite the best way to do so.

Go Up