Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Engineering Essentials]
Save Power By Managing Unused CMOS I/O Pins
ignoring unused inputs can also wreak havoc on debugging tasks, but following these few simple approaches can alleviate those headaches.

Jonathan Dillon  |   ED Online ID #21773  |   October 1, 2009


It’s easy to overlook unused digital inputs when designing with a CMOS device, but doing so invites problems. When unused digital inputs are left unconnected they will float, which can cause both unexpected logic behavior and excessive current draw. Several simple approaches for managing these unused inputs can save significant debugging grief.

Essentially, a CMOS digital input circuit uses MOSFET transistors in pairs (see the figure). Therefore, when the input signal is logical high or logical low, one transistor is on and the other one is off. As a result, CMOS technology only draws current when it’s switching; that is, when one MOSFET is turning on while the other MOSFET is turning off in order to change the output state.

This current draw occurs during the short time needed to charge or discharge each MOSFET’s gate capacitance to effect the state change. During this state change, both MOSFETs are partially on, which creates a path for current from VDD to VSS. Current flowing down through the two MOSFETs in this manner is called “shootthrough” current.

Datasheets typically define voltage ranges for the input signal’s logical high and low, with an undefined region in the middle. Somewhere in this undefined region is the actual change-over voltage at which the circuit will change from seeing one logical input level to the other. The precise change-over voltage is undefined because it ultimately depends on the circuit’s operating voltage, temperature, fabrication geometry, and product batch variation.

FLOATING INPUTS
A CMOS digital input has a very high impedance. Consequently, when it’s not driven it will float, creating an undetermined input logic level. More importantly, the input may not stay that way and, in fact, it likely will not. For instance, reading the input in software will show a logical high or low, but waving a hand above the circuit board can be enough to cause the input levels to change.

Over time, however, the floating input tends to accumulate a charge and float toward the logiclevel change-over point. When it reaches that point, it causes both the high and low MOSFETs to be partially on, resulting in shootthrough current.

When the input buffer output switches state, the floating input can lose charge, causing the circuit to switch back. This keeps the charge hovering around the change-over point and makes the floating input very susceptible to noise, especially from signals switching on adjacent pins. Engineers need to be especially careful of a floating programming control or reset pins where a nearby toggling line may generate enough noise to make the microcontroller repeatedly drop in and out of programming or reset mode.

A floating input hovering around the change-over point, and thus causing shoot-through current, will cause the CMOS device to exhibit higher than expected power draw. This may not be especially noticeable when the device is running. However, it can be significant for devices such as microcontrollers in their low-power state. In addition, the input’s logic level may change at any time and trigger unexpected responses from the device.

AVOID FLOATING INPUTS
There are several ways to avoid floating inputs. Many microcontrollers power up their configurable I/O as inputs because the desired output level isn’t initially known. For such devices, simply configure unused pins as outputs and drive them high or low. Make certain that this is done under all paths through the code, though, or there may be one mode where the pin may still be floating.

You could also use external pull-up or pull-down resistors to ensure the states of lines while the device is in reset or the I/O are still being configured. Some chips already incorporate internal pull-up or pull-down circuitry as part of their digital input circuits, so designers can enable this internal termination during device programming or under software control. If internal termination isn’t available, external resistors or resistor networks must be designed in.

An alternative for avoiding floating digital inputs is to connect the pin to VDD or ground. In taking this approach, however, make sure that this pin is never accidentally configured as an output driving the other way. If that were to occur, there would be no limits on the current sourced or sunk, and the device would most likely become damaged.

One additional trick, where available, is to configure unused inputs as analog peripherals, such as comparators or analog-to-digital converters (ADCs). Consequently, the device’s control logic would disconnect the digital input. A floating input simply looks like an ordinary analog voltage to the peripheral, and it won’t cause any adverse effects.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?



Reader Comments

It really depends upon the type of logic that you are dealing with to determine how to terminate unused inputs.

If the device has unused components (such as a 7404) then the unused inputs need to be considered.

If the device is a 74HC04, then the unused inputs can be directly connected to either rail. If the device is TTL logic (does anybody use this stuff any more?), then the input hysteresis may not make the inputs need to be connected at all. Know the electronics you are using, and the rest gets easier! I don't like adding components to do nothing on my circuit boards so I avoid using technology that requires input pullups/pulldwn resistors.

Jeffrey Schatz -November 03, 2009

I was using a CMOS NAND gate to "square" a slow sine wave. It was easier to connect the two inputs together, but that increased the power consumption by ~5ua (20%) over connecting an input to Vcc.

D. Morehouse -November 03, 2009

It's usually a good practice to use a resistor to pull an input up or down. Up is definitely preferred with TTL since IIL is larger than IIH. I just looked at the 5404 datasheet and it's 40uA vs 1.6mA.

With CMOS you can pull on input high or low, then use the associated output to control the other inputs.

E. Tanner -November 02, 2009

It may be OK for CMOS to connect unised pind to Vcc OR GND. But we used 5404 inverters, and following the advice of National (the manufacturers), connecting them to GND initiated and avalanche destruction of a number of 5404s, namely, the Vcc internal wire connection blew. Connecting unused pins to Vcc, however turned out to be safe. Upon a request we received no reply from National technical support. DO NOT USE GND, USE Vcc INSTEAD!

Jiri Polivka -November 02, 2009

POST YOUR COMMENTS HERE
Name:

Email:
Your Comments:

Enter the text from the image below


Please refresh the page if you have trouble reading this text.

Search Electronic Design
     
  
 
Email Newsletter
Sponsored By:
The Find Power Products monthly newsletter brings you the most important new developments within the world of power design. The newsletter includes exerpts from industry leader Sam Davis's exclusive blog, as well as overviews of the latest new products.

Enter Email to Subscribe
  
Web Seminar
Sponsored By:
Title: Exploring How Good GUIs Drive Adoption in the Digital Power Management Space
Speakers: Don Tuite Deepak Savadaatt
Date: 10/24/07
Register: 

Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources