??? 01/18/05 21:24 Read: times Msg Score: +2 +2 Informative |
#85244 - 5V compatible vs TTL |
I missed out on the flame war below regarding 5V tolerance and 3.3V logic and what is and what is not TTL. Since that thread is closed, I figured I'd chime in with my two cents and tell a tale, too. Bear with me. Or mod me down "boring."
First of all, "5V compatible" or "5V tolerant" does NOT imply TTL. TTL is about logic thresholds -- specifically, 0.8V and less is a logic low and 2.4V and above is a logic high. (It's also about the loads presented to drivers, etc. But that's secondary to this discussion.) Old-skool TTL is of course specified with a 5V power supply. This applies to all of those old logic families we used to use: 74XX, 74LXX, 74SXX, 74LSXX, 74ALSXX, 74FXX. At some point, somebody started making CMOS versions of the bipolar chips. This is where you get your 74HCXX, 74ACXX and 74AHCXX types. The point here is that HC and AHC logic is NOT TTL, they're straight CMOS, which means the logic thresholds are basically a function of the power supply; logic low is generally lower than 0.33*VCC and logic high is generally higher than 0.66*VCC. However, when using 5V supplies, these parts generally work fine with TTL. For some applications, the parts don't work, so they came up with the HCT, ACT and AHCT variations. The input logic levels of these parts are strictly TTL, 0.8V low and 2.4V high. Now, there are two competing trends. One is the push towards lower power supply rails, and the second is the one that keeps logic thresholds at the status quo -- meaning TTL. So, you end up with logic families like LVTTL, which are specified to work with 3.3V supplies but still have TTL logic thresholds. Of course, when using 3.3V rails, you can't swing to above 3.3V so as Erik points out, there is a loss of margin on the top end, but in most cases you're OK. Below 3.3V, all bets are off and you must use translators to interface to 3.3V or 5V or other logic families. Now, my story, and it's on-topic because the micro is an 8052 variant. I just did a USB audio device based on the TUSB3200A. This guy needs both 3.3V and 5V supplies. The ports on this chip are advertised as "5-V compatible TTL/LVCMOS input/output buffer with an internal 100uA pullup." However, they are powered by the 3.3V rail. I needed more ports than what the chip has available, so I plunked down a 74LV595A serial-in/parallel-out shift register (which is a lot cheaper than the PCF8574 I2C expander) and powered it from the 3.3V rail. Since I was using this chip to drive LEDs, I thought about two issues. One, why waste current from the 3.3V regulator and connect the LEDs to the USB 5V instead? Second, I wanted to use a dual red/blue LED that is available only in a common-cathode configuration, and I was concerned that a 3.3V port output wouldn't be high enough to turn on the LED. So I powered the 'LV595 from the 5V rail instead. And some prototype boards worked and some didn't. Specifically, the boards with TI parts failed and the boards with Philips parts worked. Lots of headscratching followed. Some of you playing along at home have already guessed the answer. Yes, the 'LV595 is rated for 2V-5.5V Vcc, so 5V was fine. However, it's got CMOS thresholds at 0.3*Vcc and 0.7*Vcc. So, with a 5V rail, you need a 3.5V input to ensure a valid logic high. But it was driven by a chip with 3.3V rails. So, guess why it didn't work. I replaced it with an HCT595 and now it works beautifully. As in all things, RTFM. -a |