# Newbie with a question: Why do you need those resistors in IC based digital circuits?

Discussion in 'Electronic Basics' started by Steve Wake, Dec 12, 2003.

1. ### Steve WakeGuest

Hi,

I'm attempting to get into digital circuit design again after a long
abscencse because I don't like the current 'buy a block box pc with the
necessary hardware to support what you want' when it looks like you can
accomplish your goals with small purposed circuits such as the BTnode
project which fits almost into what I would like to do.

Anyways, the last time I dabbled in this I always wondered what was meant by
'pull-up' and 'pull-down' in relation to outputs on an IC. Coming from a
programmers point of view I look at things like outputting a '1' or a '0',
meaning whatever the voltage the chip runs at (e.g. 5v or 3.3v) as easy to
achieve, however suddenly what looks to me like 'analog stuff' such as
resistors are thrown into the mix as part of the circuit.

My understanding is that it makes sense that if you output a voltage on a
pin, such as an address line, during one cycle and then that pin or address
line is not needed for the next cycle (i.e probably every even address
access for the lowest pin on a sequential memory access to ram chip) then
you need to get that pin back to '0' voltage or you'll get the wrong data
back. Is this what a pull-down resistor does?

I'm looking at some microcontrollers at the moment which are way more
integrated than the chips I originally looked at, such as the old MC68000
series, so maybe the lack of pull-down resistors on every address line is
because this functionality is integrated on chip? Here is where my confusion
lies... If that's what they're for then why do you not see them everywhere?

I do know about latches so is this anything to do with it? Is it a designed
harmonious combination between two chips which means that one of them is
doing this internally so you don't need the extra resistor or whatever?

Thanks,
Steve

2. ### John FieldsGuest

---
If you look at the outputs of logic devices you will find that there are
three types; one which is always either at a logic "1" or a logic "0",
one which is always either at a logic "1" or "0" or floating, (3-state)
and one which is always either at a logic "0" or floating (open
collector/open drain).

Now, if you look at the inputs to CMOS logic devices you will find that
they are always floating, so that with power applied to the chip and the
input undefined, the output will always be undefined.

Now, if you connect the input of a driven logic device to the output of
a driving logic device which is always pulled up to the positive rail
("1") or pulled down to ground ("0") that input will never float and its
output will always be either a "1" or a "0".

If you connect the driven input to the output of a 3-state device, then
the driven device's output will always be defined when the output of the
3-state device is either a "1" or a "0", but will not be defined when
the driving device's output goes into the high-impedance 3-state mode.
The 3-state connection is used when several driving devices' outputs
need to be connected to the same point, (usually one or more inputs of
driven devices) and is made to function by turning off all of the
devices connected to that point but one. In order to keep from having
two devices' outputs "ON" at the same time, (called "contending for the
bus") the currently "ON" device is turned "OFF" and then a previously
"OFF" device is turned on. This results in a sliver of time during
which the input of the driven device is neither "ON" nor "OFF" and,
consequently, its output state cannot be defined. In order to keep this
from happening the bus (the point to which the output devices are
connected) is either pulled up to a logic "1" with a resistor or pulled
down to a logic "0" with a resitor in order for the state of the bus
never to be undefined. This also allows _all_ of the driving devices to
be turned off, if desired, while leaving the bus in a known state.

In the case of an open-collector or open-drain output, the (usual)
output configuration for the driver is that of a transistor with its
emitter/source grounded and its collector/drain left floating. That way,
when the output transistor is turned on, the device connected to the
collector/drain will be switched to ground while when the transistor is
turned off the device(s) connected to it will be left to float. That
is, unless the collector is pulled up to a "1", in which case the input
of the driven device will go to a "1" when the transistor is turned off.

In the case of the microcontroller you're looking at, there may or may
not be internal pullups or pulldowns in it, but its documentation will
surely tell you, and will tell you what you'll need to do to invoke them
or ignore them if that's what you want to do.