Output buffer with automatic tri-state? - Page 1
Forum section: electronics / projects

author: sebmadgwick
author_rank: Regular Contributor
timestamp: September 14, 2013, 11:23:33 am
content: Hi all, I've heard allot about this forum but this is my first post!I am looking for a driver chip to buffer my 3.3V uC output signals (e.g. to 50 mA) that will automatically set the outputs to high impedance when the uC pin is set to an input. I don't actually care about reading the uC pin when it's an input, I just want to be able to set my outputs to high-impedance. I need 16 independent tri-state outputs in total.And to make things difficult... I need a single chip solution (e.g. 4 channels per chip) and it needs to be small (e.g. QFN).Any ideas?

author: SeanB
author_rank: Super Contributor
timestamp: September 14, 2013, 11:28:40 am
content: You will need an extra pin to enable the buffers, or use open collector drivers and a pull up resistor if speed and drive capacity is not an issue. In that case then you just set all the outputs to a "1" when not needed.

author: dannyf
author_rank: Super Contributor
timestamp: September 14, 2013, 11:30:42 am
content: A transistor array with pull-down will do that.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: September 14, 2013, 11:33:01 am
content: I don't have spare pins to control tri-state. It is a fairly simply to design what I want with discrete components; I just want it all wrapped up in an IC. Surely there must be a chip out there to do the job?

author: dannyf
author_rank: Super Contributor
timestamp: September 14, 2013, 12:22:46 pm
content: QuoteWith enough money, you sure can get someone to custom fab one for you.QuoteThe more conditions you pile on, the less likely you will find one.

author: jaxbird
author_rank: Frequent Contributor
timestamp: September 14, 2013, 12:33:22 pm
content: Quote from: sebmadgwick on September 14, 2013, 11:23:33 amYou could have a look at an IO expander, but with serial interface:http://www.maximintegrated.com/products/interface/io_expanders.cfm

author: Unknown
author_rank: Unknown
timestamp: September 14, 2013, 12:44:16 pm
content: Or, less exotic, a shift register with 3-state outputs like a 74HC595. I'm sure you can find them in QFN.

author: dfmischler
author_rank: Frequent Contributor
timestamp: September 14, 2013, 12:50:19 pm
content: Quote from: sebmadgwick on September 14, 2013, 11:23:33 amPerhaps a little more detail would help. How will the driver chip know when the uC pin is set to an input? You said later that you could do it with discrete components. Maybe showing us how that would work would jog somebody's memory/creativity.

author: AndyC_772
author_rank: Super Contributor
timestamp: September 14, 2013, 01:06:42 pm
content: Does the output need to both source and sink current, or could it be open collector / open emitter?If you only need to, say, sink current, then the output buffer can be chosen so that it sinks current when the input is in one state, and doesn't sink current when its input is in the other state. A simple transistor can do this.If you need to both source and sink current, then you have no choice - the output buffer needs to 'know' whether to source, sink or go high impedance, and that's three possible states. You can't convey that information with a single digital I/O pin which only has two states.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: September 14, 2013, 02:11:52 pm
content: Quote from: AndyC_772 on September 14, 2013, 01:06:42 pmIt needs to source and sink.Quote from: AndyC_772 on September 14, 2013, 01:06:42 pmThe uC pin has three states including high impedance. Take a look at my schematic, I hope I haven't made a mistake.Quote from: dfmischler on September 14, 2013, 12:50:19 pmAttached

author: AndyC_772
author_rank: Super Contributor
timestamp: September 14, 2013, 02:42:14 pm
content: Looks OK to me, provided you use FETs or include a series resistor between the comparator outputs and the base of each output transistor.Still can't say I've ever seen a chip that does exactly this, though...

author: dannyf
author_rank: Super Contributor
timestamp: September 14, 2013, 02:56:55 pm
content: QuoteAsk yourself two questions:1) as the input goes from 0v to Vcc, what happens to the current through the switches?2) as the input goes high-z, what happens to the current throug the switches?You think you can do it and you can do it are often two different things.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: September 14, 2013, 03:33:34 pm
content: I meant to use FETs in above schematic, sorry for confusion. My uC signal might be DC, PWM, UART etc so an 'I/O expander' isn't going to work. I know there isn't going to be chip for everything but a 'tri-state follower' seems like a useful part, right?There might not be a purpose build chip but perhaps there is a part intended for something else that contains all the right elements; just needs wiring a certain way, maybe an external pull-up. just needs some creative thinking

author: edavid
author_rank: Super Contributor
timestamp: September 14, 2013, 03:52:57 pm
content: Maybe one of these chips would work:http://www.fairchildsemi.com/an/AN/AN-9740.pdf

author: Dave
author_rank: Super Contributor
timestamp: September 14, 2013, 04:38:07 pm
content: Comparators usually have an open drain output. The bottom transistor would never open.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: September 14, 2013, 06:07:19 pm
content: Quote from: edavid on September 14, 2013, 03:52:57 pmI was looking similar device (TXB0104) but these types only drive edges and only change direction when being driven that way.Quote from: Dave on September 14, 2013, 04:38:07 pmGood point.I've attached a more obvious circuit that provides the required functionality. Now that I've spent some time thinking about the different ways this could be implemented, I'm doubtful that a single chip solution would exist. I'm going to give up on this one. Thanks for all your suggestions.