-3

I am a beginner in electronics. I searched on the web about Pull up and Pull down concepts. As far as I know,

1) When an MCU pin is pulled up, a small amount of current pass through the pull-up resistor to that particular pin. As this current creates a voltage drop across the internal pin resistor that MCU pin detects it is in a high state. Am I right?

2) What happens when I use pull-down? How an MCU pin finds it is being pulled down?

MarkU
  • 14,413
  • 1
  • 34
  • 53
  • What do you mean by "on MCU side"...do you mean an internal pullup or pulldown? And what do you mean by "detects"? – Elliot Alderson Apr 03 '19 at 14:40
  • 1
    MCU can only detect the voltage level (if we are talking of some input pin). and the voltage might depend on whether the pin is pulled up or down. – Eugene Sh. Apr 03 '19 at 14:49
  • Related https://electronics.stackexchange.com/questions/222943/what-actually-happens-when-we-set-direction-on-gpios-in-controllers – Passerby Apr 03 '19 at 14:52
  • There will be a low-power not-very-precise analog comparator monitoring that pin. – analogsystemsrf Apr 03 '19 at 15:20
  • Your confusion here is in thinking that the pullup matters - the input circuitry only cares about the actual pin state, it doesn't care *why* it has that state - regardless if that is true due to being driven internally or externally or pulled up or down internally or externally. – Chris Stratton Apr 05 '19 at 16:29

1 Answers1

0

A pull up resistor is a resistor connected between a pin and whatever logical high voltage is. If the pin is left "floating" (nothing else is pulling it high or low), it'll report high.

A pull down is the same thing, except it's connected to ground.

They can be internal or external to the MCU. Internal resistors tend to be pretty high in value (10K+). External ones, especially for interfaces (eg I2C), can be a lot lower.

yhyrcanus
  • 336
  • 1
  • 8