Devices


# What are pull-up/pull-down resistors

  • components used in electronic circuits
  • ensure a digital input signal has a defined voltage level : 1(HIGH)/0(LOW)
    • when no other active source influences the signal
  • avoids disturbances, noise, mistakes, …

# Pin Input Circuit using a button or switch

How to connect a switch to a digital input pin?

prevent a floating input voltage

  • no disturbances, noise, …

# External Resistors

physical components - not built in the microcontroller

# External Pull-down Resistor

connected between digital input & positive supply voltage (VCC/5V)

  • puts voltage to LOW = 0

Button closed - HIGH input Button open - LOW input


# External Pull-up Resistor

connected between digital input & Ground (GND)

  • puts voltage to HIGH = 1

Button closed - LOW input Button open - HIGH input


# Internal Resistor

Built into the microcontroller for digital IC Typically controlled through software settings

  • not physical components

# Internal Pull-up Resistor

  • ATmega has internal pull-up resistors
  • Configuration with
    • PORTx
    • DDRx

Button closed: input is LOW Button open: input is HIGH