I'm wondering if there is such a thing as a tri-state buffer that can auto-detect the driven signal? It would recognize a driven high or low and output the same, and be able to detect a floating input, and go to high Z.
I want a buffer that can source or sink >50mA, something my PIC won't do. The auto detect saves me driving a separate enable line.
Can anyone point me to such a thing?
Thanks and Regards, Max
Didn't find your answer? Ask the community — no account required.
D
DJ Delorie
My furnace controller has a set of these, for driving up to 100mA tri-state from an MCU. It uses comparators and MOSFETS:
formatting link
For the gschem-challenged:
formatting link
S
Sylvia Else
If they do what the OP wants, one would have to wonder what happens when you connect two of them together.
Sylvia.
P
Phil Hobbs
A window comparator, NPN and PNP transistors and a few resistors? Bias the input to Vdd/2, connect the emitters to the respective rails, connect the collectors to the output, drive the bases from the comparators via resistors. (Level shifting left as an exercise for the student.) ;)
A more Joergesque solution would probably involve four transistors--NPN and PNP bases to the input, emitters tied together to Vdd/2 via appropriate voltage divider, collectors drive output transistors as above. (Joerg would be able to get the noise immunity right, too.)
Neither of these is as fast or as clean as a tri-state buffer, so if you need the speed, the window comparator could drive the enable line.
For a MPU application, I might want to try a bit harder to have everything under CPU control--having the effective circuit topology change itself like that might give rise to some unusual failure scenarios.
Cheers
Phil Hobbs
V
Vladimir Vassilevsky
Take an ordinary 3-state buffer. Add a pair of resistors and a pair of the logic gates so they will control the OE.
...but the real problem is that you are giftless and the design is bad.
Vladimir Vassilevsky DSP and Mixed Signal Design Consultant
formatting link
J
John Larkin
There are a few around, but I don't know of one that will drive 50 mA.
Here's one way to do it...
formatting link
John
G
Greegor
state buffer that can
ow and
Z.
2nd link gets a "do not link directly to this image" message. LOL
J
Jamie
Hmm, so the PIC has a HI-Z output option?
formatting link
"
F
Frank Buss
Yes, program the port as input.
Regarding the problem of the OP: All automatic solutions require some time, which depends on how much power you want to waste (lower voltage divider means faster auto detection, but higher constant current flow). Why not using a bigger microcontroller with more IOs and then using an extra output for output enable?
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
N
Nobody
So just copy & paste the URL into your web browser.
D
DJ Delorie
formatting link
I've had a lot of problems with people linking images from my server into their web pages and eating up my bandwidth. You're likely using web-based mail, which looks just like that case. I try to detect those and block them, to save my bandwidth. I just put in a gmail exception, that seems to be the common case, please try again.
D
DJ Delorie
The same thing that happens when you connect any other tri-state pins together, I would guess.
J
Jamie
Max Moor wrote:
I have inserted a Ltspice example , the Mfets need to have a low gate turn on. If the turn on state is a problem , Q1 and Q2 can drive a optical coupler there by, the low voltage from the CPU will hinder the bias on the Mfets.
Version 4 SHEET 1 880 680 WIRE 224 32 -16 32 WIRE 352 32 224 32 WIRE 448 32 352 32 WIRE 352 48 352 32 WIRE 224 64 224 32 WIRE 448 64 448 32 WIRE 160 112 64 112 WIRE 64 128 64 112 WIRE 304 160 224 160 WIRE 400 160 400 80 WIRE 400 160 304 160 WIRE 448 176 448 160 WIRE 512 176 448 176 WIRE 352 192 352 128 WIRE 352 192 224 192 WIRE 400 192 352 192 WIRE 448 192 448 176 WIRE 304 208 304 160 WIRE 160 240 160 112 WIRE 400 272 400 192 WIRE 448 288 448 256 WIRE -16 304 -16 112 WIRE 64 304 64 208 WIRE 64 304 -16 304 WIRE 224 304 224 288 WIRE 224 304 64 304 WIRE 304 304 304 288 WIRE 304 304 224 304 WIRE 448 304 448 288 WIRE 448 304 304 304 WIRE 512 304 512 256 WIRE 512 304 448 304 FLAG -16 304 0 SYMBOL voltage -16 16 R0 WINDOW 0 -48 16 Left 0 WINDOW 3 -49 104 Left 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 5.0 SYMBOL Misc\\\\signal 64 112 R0 WINDOW 3 24 44 Invisible 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value PULSE(0 3.3 0.0 0.01 0.01 0.25 0.5 0) SYMBOL res 496 160 R0 SYMATTR InstName R2 SYMATTR Value 100 SYMBOL nmos 400 192 R0 SYMATTR InstName M2 SYMATTR Value Si4836DY SYMBOL pmos 400 160 M180 SYMATTR InstName M1 SYMATTR Value SI3445DV SYMBOL res 288 192 R0 WINDOW 0 38 37 Left 0 WINDOW 3 28 79 Left 0 SYMATTR InstName R3 SYMATTR Value 1000 SYMBOL npn 160 64 R0 SYMATTR InstName Q2 SYMBOL pnp 160 288 M180 WINDOW 0 41 38 Left 0 WINDOW 3 41 67 Left 0 SYMATTR InstName Q1 SYMBOL res 336 32 R0 WINDOW 0 -33 50 Left 0 WINDOW 3 -49 25 Left 0 SYMATTR InstName R1 SYMATTR Value 1000 TEXT -50 328 Left 0 !.tran 0 1 0 1 startup TEXT -8 216 Left 0 ;Tri-State sign
formatting link
"
J
Jim Thompson
Frequency?
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine Sometimes I even put it in the food
M
Max Moor
Max Moor wrote in news:Xns9BB2EA00F6B28maxmoorhotmailcom@74.209.136.88:
Wow! I don't think I've ever had a news group response like this before. Thanks for all the suggestions.
Looking again, the PIC does not have a high z option for the IO pins. I thought it did. (Rats!) I do need that, so I'll likely use a tri-state buffer/drivers, and, as one person suggested, use a PIC with a few more IO pins to cover the OE's.
Best Regards, Max
J
Jon Kirwan
Which PIC? Have you looked closely at the TRIS registers and considered modifying them as part of your protocol?
Jon
N
Nobody
His headers indicate that he's posting via Google Groups, so he's probably reading that way:
formatting link
J
Jan Panteltje
On a sunny day (15 Feb 2009 22:04:39 GMT) it happened Max Moor wrote in :
pins.
The PIC has a hi z option, just configure TRIS for that port as input. Your questions has the following answer: There are 3 states, high, low, and tristate. The number 3 in binary is 11 That requires *2* digits, or in this case 2 pins, no matter how you slice it.
S
Sylvia Else
Normally, the output state of a tri-state is not a function of what it's connected to. The OP's requirement appears to be an output that is. So the situation would not be the same.
Sylvia.
M
Max Moor
Jon Kirwan wrote in news: snipped-for-privacy@4ax.com:
Hi Jon,
Well, I guess I was wrong twice in a row. Sorry about that. I'm looking at using a PIC18F4450. I picked this one for its USB port, relatively high I/O count (34 IO), and DIP package. I'm a PIC virgin, and want to do some dirty breadboarding to prove a concept before picking a production part that may fit better.
Anyway, sure enough, if you set the TRIS register for inputs, the output is high Z. I really need to give the rest of this thing a good read, rather than skimming.
- Max
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.