Sunday, April 1, 2018

TTL Logic families compatibility

Logic families compatibility

Introduction

A few year ago, the logic gates were all using 5V and everything was clear. But today (2018) we see more and more 3.3V logic. The Raspberry PI, the Arduino M0, the Digilent Basys3, the Wemos D1 Mini have all 3.3V inputs But the classical Arduino UNO has 5V logic ports.

This WEMOS D1 MINI PRO is has 3.3V ports but the Arduino MEGA ADK has 5V ports

This means that when you are designing a circuit, you have to take care of the logic level you are using and when needed use level shifters that will convert the logic signal to the correct level.

Logic families

There are quite a few digital circuits families. The most common are the 74HCxxx, the 74HCTxxx and the very old 74LSxxx but there are many others.





The input level determine what voltage range is acceptable for a HIGH level and what voltage level is acceptable for a LOW level

For a 74HCT00 input, the LOW level is associated to a voltage between 0V and 0.8V and a HIGH level is associated to a voltage between 2V and 5V.

This means that voltage below 0V or above 5 V may damage the chip and any voltage between 0.8V and 2V is not a well defined logic signal.


To know if the output of a gate is compatible with the 74HCT family we must know if the gate output level fall within the acceptable values. However, this is not as simple as one would expect as the gate output voltage is dependent on the gate power supply voltage (i.e. the VCC value) and the current that the gate provide (the more current is drawn from the gate the lower the HIGH voltage shall become).

If we take a 74ALVC00 with VCC = 2.7V and an output current of 12mA we have the HIGH voltage = 2.2V and a LOW output voltage of 0.4V.

We see that the the 74ALVC00 output voltage HIGH (2.2V in the selected conditions) fits inside the 74HCT00 High voltage input range (between 2 and 5V) and that the 74ALVC00 output voltage LOW (0.4V in the selected conditions) fits inside the 74HCT00 LOW voltage input range (between 0 and 0.8V)



So Yes a 74ALVC00 with VCC2.7V can drive a 74HCT00 wit VCC=5V


What happens if we do the opposite

The 74ALCV LOW input voltage ranges is between 0 and 0.7V and the HIGH input voltage is between 2V and 3.6V. The 74HCT has an output voltage LOW between 0 and 0.44V and an output voltage HIGH of at least 0.44V



This means that contrarily to the previous case, here the gates are not compatible and connecting them that way could damage the 74ALVC00 gate.




This incompatibility is due to the fact that the 74ALVC is not 5V tolerant. If we had used a 74LVC instead (which is a 5V tolerant family)  it would have been OK.

Compatibility table

The table below was obtained by analyzing the datasheets of a NAND gate (7400 or equivalent) from each logic family and comparing the input and output voltage ranges.



To use the table select an output family (e.g. 74HCT: last line) it will indicate to what kind of gate input it can be connected. In the 74HCT example, any family except the 74AC,74HC (if VCC is 3.3V) ,and 74 ALVC.

As you can see in the table there is much more green than red which is a very good news since this means that many families are indeed compatible


input
PSU =3V
PSU=5V
Logic type

CMOS in 3V
TTL3V ONLY
CMOS in 3V 5V Tolerant
TTL3V ONLY 5VTolerant
CMOS in 5V
CMOS in 5V
old CMOS
TTL5V only
CMOS 5V only compatible TTL

Family names
AC

HC
ALVC
AHC

LV

VHC
LCX

LVC

LVX
AC

HC
AHC

LV

VHC
CD4xxx ALS

AS

F

LS

S
ACT

AHCT

HCT
output PSU =3V CMOS in 3V
AC

HC
Y
Y
y
Y
N
N
N
Y
Y
TTL3V ONLY
ALVC
Y
Y
Y
y
N
N
N
Y
Y
CMOS in 3V 5V Tolerant
AHC

LV

VHC
y
Y
Y
Y
N
N
N
Y
Y
TTL3V ONLY 5VTolerant
LCX

LVC

LVX
Y
y
Y
Y
N
N
N
Y
Y
PSU=5V
CMOS in 5V
AC

HC
N
N
Y
Y
Y
y
Y
Y
Y
CMOS in 5V
AHC

LV

VHC
N
N
Y
Y
Y
y
Y
Y
Y
old CMOS
CD4xxx
N
N
Y
Y
Y
Y
Y
Y
Y
TTL5V only
ALS

AS

F

LS

S
N
N
Y
Y
N
N
N
Y
Y
CMOS 5V only compatible TTL
ACT

AHCT

HCT
N N Y Y Y Y Y Y Y

Adapting levels

As can be seen in the table above, there 3 types of incompatibilities

TTL 5V driving CMOS 5V

This is a very old incompatibility that dates back to 1970!

e.g. a 74LS driving a 74HC or a 74F driving a CD4000

The TTL 5V gates have an HIGH voltage level that is not high enough to be identified as a HIGH level by the CMOS gate

One simple solution is to interface both systems using a 74HCT gate. indeed the input of a 74HCT gate is compatible with TTL 5V and its output is compatible CMOS




TTL 3.3V driving CMOS 5V

This is the same incompatibility as for TTL 5V driving CMOS 5V: the TTL 3V output voltage HIGH is not HIGH enough. Here also, using a 74HCT is a good workaround.



5V Logic driving 3V3 Non 5V tolerant logic

This is the problem: that occurs when you want to drive a Raspberry PI input with a 5V signal. You risk to damage  the 3V3 raspberry PI chip with the 5V output. The workaround is to use 5V tolerant 3V3 logic gate.e.g. a 74LVC gate as interface.


DISCLAIMER:

 The compatibility table was made by analyzing the datasheet of one manufacturer (most of the times Texas Instruments and sometimes ON SEMI or other manufacturers) .Some extrapolation was needed when the datasheet did not contain the value of VCC (3.3V / 5V) or the gate output current (12mA). This means that the table is for reference only and I cannot guarantee it does not contain some errors or inaccuracies. This table is no replacement for consulting the manufacturer datasheet

No comments:

Post a Comment