You are on page 1of 17

JABATAN TENAGA MANUSIA

KEMENTERIAN SUMBER MANUSIA

DIPLOMAKEJURUTERAAN
TEKNOLOGI TEKNOLOGI
ELEKTRONIK
KOMPUTER

VJ13-43-02
MICROCONTROLLER

www.jtm.gov.my
JABATAN TENAGA MANUSIA

Topic 2.0
Pull-down Resistors

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

Pull-down resistors work in the same


manner as pull-up resistors, except that
they pull the pin to a logical low value.

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

Pull-down resistor

They are connected between ground and the


appropriate pin on a device

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

In this figure, a pushbutton switch is


connected between the supply voltage and a
microcontroller pin.

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

To prevent this unknown state, a pull-down


resistor will ensure that the pin is in a low
state.

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

In such a circuit, when the switch is closed,


the microcontroller input is at a logical high
value, but when the switch is open, the pull-
down resistor pulls the input voltage down to
ground (logical zero value)

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

The pull-down resistor must have a larger


resistance than the impedance of the logic
circuit, or else it might be able to pull the
voltage down by too much and the input
voltage at the pin would remain at a constant
logical low value – regardless of the switch
position.

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

When the button is NOT PRESSED, the


input pin will read a LOW state

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

circuit simulation

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

When the button is PRESSED, the input


pin will read a HIGH state

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

circuit simulation

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

If the resistor wasn’t there, the button


would connect VCC to ground, which is
very bad and is also known as a short

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

NOT PRESSED = LOW state

if (digitalRead(SW)==LOW)

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA

PRESSED = HIGH state

if (digitalRead(SW)==HIGH)

Be Inspired, Be Extraordinary, Be World Class with TVET


JABATAN TENAGA MANUSIA
KEMENTERIAN SUMBER MANUSIA

TERIMA KASIH / THANK


YOU

17
www.jtm.gov.my

You might also like