In my explorings I have come across the terms ‘pull up’ and ‘pull down’ resistors in conjunction with digital circuits. So… what are they? How do they work? And why do we need them?
CMOS gates are sensitive to static electricity and can be damaged by high voltages, they may also assume any logic level if they are left ‘floating’. Say if you have a switch connected to your CMOS chip through to ground, when the switch is pushed ground is connected to the input pin. Unfortunately when the switch is open the signal to that pin is open to interference and static, this is a ‘floating’ state. Floating is bad, very bad. It can cause damage to your chip and send misleading signals to your circuit. To get around this you use a pull up or pull down resistor.
A pull up resistor does exactly that, pulls a signal up. It holds the pin in a high state stopping it from floating and so getting rid of any unwanted signals. Pull down resistors do exactly the same thing just pulling the signal low.
This diagram shows an input that is floating, the switch is open so the pin is subject to static and interference:
This one shows the positioning of a pull up resistor (for a pull down the switch and the resistor would swap places):
Most useful