Logic
Home Up HD44780 I2C Address I2C Connector Crystals Logic Translate DC Supply Compatibility Load Cell

 

Digital Logic types

Some advice on the choice of logic IC in typical microcontroller projects

CMOS IC Types

74HC and 74HCT series HCMOS "5V" logic

74HC and 74HCT logic should probably be your first choice for miscellaneous logic in microcontroller projects.

74HC series typically runs from voltages in the range 2V to 6V so it covers the range of supply voltages used by common microcontrollers. A small number of devices will tolerate 10V. Device pin-outs match those of TTL and LSTTL devices with the equivalent number, for example a 74HC00 has the same pin-out as 74LS00. 

74HC is a CMOS technology so logic inputs have a high impedance (at low frequencies). This means one logic output can drive a large number of logic inputs. Because of the high impedance an unconnected input will float at an uncertain level so inputs that aren't always connected should be equipped with a pull-up or pull-down resistor.

74HCT series is intended to be powered from 5V+/-10%. It should accept a wider range but the entire point of "HCT" is to be compatible with other 5V logic families. A secondary use for HCT is that it will accept signals from a 3.3v powered device such as a microcontroller due to the lowered input threshold. The converse may not be true, not all 3.3v parts will accept 5V logic levels.

74HCT devices have good compatibility with 1980s NMOS microprocessors such as the 6502.

74HC parts powered from 5V can be interconnected with 74HCT parts powered from 5V.

Some 74HC parts have long part numbers such as 74HC4053. These are HCMOS equivalents of older 4000-series CMOS parts. 

74AC and 74ACT series logic

These are a higher speed and drive version of HCMOS. 

Tinylogic or similar single gates

Most of the multi-gate packages have single gate equivalents. These have their uses where an odd extra gate is needed, but they don't have through-hole versions so they aren't convenient for breadboarding.

4000 series CMOS "12V" logic

4000 series ICs have part numbers that may begin with CD4xxx, HEF4xxx, MC14xxx.

4000 series typically runs from voltages in the range 3V to 15V. This means many 4000 series designs can run from a PP3 9V battery without the need for a regulator. They can also be a good choice in a 12V project.

4000 series devices powered from 5V are relatively slow compared to HCMOS.

4000 series is not very interoperable with other logic families as the outputs are typically too weak to drive LS or TTL, and input levels are too high to reliably accept LS or TTL signals without a pull-up resistor.

Two special devices in the 4000 series, 4049 and 4050 can tolerate input voltages higher than their supply, making them extremely useful when sections of a circuit run from different supplies. 

The 4007UBE is worth some attention as instead of complete logic gates it contains three complimentary pairs of MOSFETs, I believe its original purpose was to allow complex CMOS gates to be "breadboarded", but now it finds applications in analogue circuits as it is one of the few devices that gives you access to a "four terminal FET", one with a separate substrate connection.

74C logic

74C logic used the same process as 4000 series, but was intended to have the same pin-out as TTL

The only 74C part of any note seems to be the 74C922 keypad encoder which to my knowledge never had a TTL equivalent. 

DG series analogue switches

While not exactly a "logic" family these parts are CMOS, made on a higher voltage process than even "4000" types, enabling them to function from +/-15V supplies or even higher in some cases.

They typically have four supply rails: V+, V-, VL and ground. The intention is that VL and Ground are the supply voltages of the digital logic controlling the switch and V+ and V- are the supplies of the analogue section being controlled. The only real limitation is that V+ must be greater than or equal to VL and V- must be lower than or equal to ground.

Aside from analogue switching DG devices also find some niche uses in translating logic levels.

General CMOS characteristics

Important note

Most CMOS parts have an important quirk that devices have internal diodes between all logic pins and the DC supply pins. These are there to protect against static electricity. It is important to ensure that these diodes do not pass significant current in normal operation. 

As a general rule CMOS inputs should not be connected to voltages outside the supply rails, however this rule may be broken in specific circumstances. Where an input may go outside the supply range series resistors should be added so that the diode current is kept small enough to prevent adverse effects. Currents below 1mA should be tolerated in simple logic gates. 

Unrestricted currents can trigger a catastrophic condition known as "latch up" in which the device conducts uncontrollably until either it destroys itself or the DC supply goes into limit.

Due to latch up risk when using high speed CMOS devices such as "AC" series some sources recommend that unused inputs should not be connected to supply rails directly but instead connected via 50 ohm resistors. 

NMOS logic

To my knowledge NMOS is not available as discrete logic gates, however several generations of microprocessor and microprocessor support ICs were made in NMOS before eventually going over to CMOS.

Some programmable logic devices may be NMOS.

NMOS has depressed input and output thresholds compared to CMOS. This makes it compatible with LSTTL and HCT devices, but pull-up resistors may be required for compatibility with HC devices.

NMOS as its name suggests is made up of N-type FETS, combined with current sources. A two input NOR gate may be formed by connection two N FETS in parallel so a "1" on either of them gives a "0" at the output.

First generation "Enhancement" NMOS

The problem with manufacturing NMOS is the difficulty in creating the current source. An on-chip resistor would take up too much space so a N-type FET was configured to partially conduct so it could function as the pull-up. In "70s" enhancement NMOS the pull-up would be the same type of device as the other FETs, and getting it to partially conduct required multiple supply rails. As an example a "4116" 16kbit DRAM IC might use supplies of +12v, +5v and -5v which is part of the reason some early 80s computers had complicated power supplies and is probably the reason why the PC-AT power supply specification includes a -5V rail.

Second generation "Depletion" NMOS

In later generations of IC improvements in processing meant it was possible to fabricate a "Depletion FET" to use as the current source. A depletion FET needs a negative gate bias to turn it off, and with its gate connected to its source it functions as a near constant current device. This is almost ideal as a pull-up device (better than a resistor) and enables depletion NMOS parts to run on a single +5v supply.

Many of the CPUs and peripheral ICs of the early 80s home computer boom were NMOS, however the developments that allowed for depletion NMOS also made high speed CMOS possible, so NMOS was superceded by CMOS. The ubiquitous 2764 EPROM was replaced by the 27C64, the 6502 became the 65C02 etc.

74 series TTL and LSTTL "5V" logic

TTL is significant as it set a standard for later logic families and seems to have rendered most of the earlier forms of logic obsolete.

TTL parts normally have part numbers of the form 74xx, or 74xxx. 4 digit part numbers tend to be logic gates and 5 digit part numbers tend to be 8 channel buffers and latches used to support microprocessors.

There were also some other TTL part series available in the late 70s. An 82xx series existed to support early microprocessors.

LSTTL is a development of TTL that largely made TTL obsolete. LSTTL incorporates "Schottky" diodes in its construction giving higher speed and lower power consumption.

LSTTL interconnects with NMOS and HCMOS subject to the limitation that LS needs a pull-up resistor to reliably drive HC parts. HCT parts may be driven directly.

LSTTL was used heavily in 1980s personal computers but has largely been superceded by HCMOS, particularly HCT

DTL Diode Transistor Logic

DTL ICs are obsolete, displaced by TTL to the extent that it is hard to even find data on DTL, however it is not unusual to find an improvised DTL gate in designs, formed out of discrete components.

ECL Emitter coupled logic

ECL is a specialized form of logic used in high speed clock circuits operating above 100MHz. Its advantage is that its supply current is a fixed value regardless of operating frequency whereas CMOS power consumption is proportional to frequency so somewhere around 100MHz an ECL gate becomes more energy efficient than CMOS. 

Another use for ECL is as a pre-scalar to a frequency counter to enable GHz frequencies to be measured. A divide by 10 or divide by 100 circuit brings the frequency down into the range of a microcontroller's internal counter.