EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / pull up resistor

pull up resistor

|

Microcontroller › 8051 › pull up resistor

  • This topic has 23 replies, 15 voices, and was last updated 9 years, 2 months ago by Anonymous.
Viewing 9 posts - 16 through 24 (of 24 total)
← 1 2
  • Author
    Posts
  • May 14, 2012 at 5:50 am #7776
    AJISH ALFRED
    Participant

     

    Regarding pull up/pull down basics,

     

    A controller pin can be used for two purposes, to give an output and to take an input. So pull up/pull down resitors are used for both input and output configuration of a pin.

     

    Suppose the pin is set as input;

     

    If our input device give a 5V, the controller detect a logic 1 at the input

    If our input device give a 0V, the controller detect a logic 0 at the input ( I’m talking about ideal conditions )

    Assume if the connection to the input device somehow got interrupted, and the device is no longer attached to the input pin. In such a case we have neither logic high nor logic low at the input pin, and the controller can’t decide which logic should be read in.

    To avoid such conditions we set a default value at the input pin using pull up/pull down resistor. If we pull up the pin the default value at the input pin will be logic 1, and if we pull down there will be a default input value of logic 0, no matter wheather there is an input device present or not.

     

    Now suppose the pin is set as output;

     

    You know, we just can’t directly drive a relay, buzzer etc. using microcontroller, because the controller dosen’t have that much current sourcing power. So we use a low value pull up resitor at the output pin to directly drive the device using VCC, and if we want to turn off the device, we just give a 0V as output and all the current through the resistor will be sinked into the controller.

    We decide wheather to use pull up or pull down at the output pin depending upon the internal circuit design of the pin, mainly its current sinking and sourcing power.

     

     

    May 14, 2012 at 5:50 am #7793
    AJISH ALFRED
    Participant

     

    Regarding pull up/pull down basics,

     

    A controller pin can be used for two purposes, to give an output and to take an input. So pull up/pull down resitors are used for both input and output configuration of a pin.

     

    Suppose the pin is set as input;

     

    If our input device give a 5V, the controller detect a logic 1 at the input

    If our input device give a 0V, the controller detect a logic 0 at the input ( I’m talking about ideal conditions )

    Assume if the connection to the input device somehow got interrupted, and the device is no longer attached to the input pin. In such a case we have neither logic high nor logic low at the input pin, and the controller can’t decide which logic should be read in.

    To avoid such conditions we set a default value at the input pin using pull up/pull down resistor. If we pull up the pin the default value at the input pin will be logic 1, and if we pull down there will be a default input value of logic 0, no matter wheather there is an input device present or not.

     

    Now suppose the pin is set as output;

     

    You know, we just can’t directly drive a relay, buzzer etc. using microcontroller, because the controller dosen’t have that much current sourcing power. So we use a low value pull up resitor at the output pin to directly drive the device using VCC, and if we want to turn off the device, we just give a 0V as output and all the current through the resistor will be sinked into the controller.

    We decide wheather to use pull up or pull down at the output pin depending upon the internal circuit design of the pin, mainly its current sinking and sourcing power.

     

     

    May 15, 2012 at 7:35 am #7817
    Amrith
    Participant

    Hello All,

     

    Really a nice and basic topic to discuss, every one did very well in explaining the reason for pull up resistor.

     

    Can we do the same with another intresting topic, 

     

    The topic is about “Signal Integrity“. Kindly find the new post on this topic and discuss the same there.

    July 2, 2012 at 11:55 pm #8182
    Anonymous
    Guest

    If there is internal pull ups to port 1, 2, 3 , then why we connect external pullups to port 1, 2, 3?????? and what happend if there is not????

     

    April 19, 2013 at 2:41 am #9516
    shankar
    Participant

    When PORT 0 is used for input operations, both the FETs are open, that means the point is at high impedance so to pull it to Vcc, the pull up register is used. For the better understanding of PORT 0 and the concept of Pull up registers check this out.

    https://www.youtube.com/watch?v=t9bN-2nFNEs

     

    Thank you.

    July 18, 2013 at 5:41 am #10160
    Narendra Krishnavanshi
    Participant

    Does Port 2 require any pull up resistors if we use it as output lines ?

    wysiwyg_imageupload:9489:

    July 18, 2013 at 7:09 am #10161
    AJISH ALFRED
    Participant

    Hi Narendra,

    It depends on the application that you have to decide whether to use or not to use the pull up resistors. I suggest you to always try to use a pull-up or pull-down resistor with a pin when you are using it as input. There might be internal pull-up resistors and if you are not using the external pull-up you must configure the internal pull-up properly which is associated with the pin.

    April 24, 2015 at 8:26 am #12827
    narayan gour
    Participant

    i have microcontroller board from my …in this borad simple microcontroller require peripheral (reset ckt,crystl oscilator.reisster etc).bt difficulty is this ckt having one more pullup registers are attached on all port…(means by default pullup is there on port 1,2,3 bt again pullup r connected on all port ,0,1,2,3,)..if i want zero or 5v on output …what i need to provide logic in my c code so i will able to get output according to my programing …means if i want high logic on output what i have to give logic in program …thanks and plz rply..

    November 15, 2016 at 5:02 am #14242
    Anonymous
    Guest

    To summarize if a port is open drain (or open collector) then that port connects to GND for logic 0. For logic 1 the circuit remains open. This enables connecting a relay, designed to be operated at 12 volt, to port 0 pins even though the chip is working at 5 volt.

    This way output load is activated when there is logic 0 on the pin. In case internal load resistors are present then external load will be off for logic 0. This will keep the current to flow through the pull down transistor. This is one disadvantage of having the pull up resistor.

  • Author
    Posts
Viewing 9 posts - 16 through 24 (of 24 total)
← 1 2
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Best practices for accurate LiPo battery monitoring on ESP32? January 21, 2026
  • Flip Flop for My Mirrors January 21, 2026
  • Micro mouse January 21, 2026
  • My Advanced Realistic Humanoid Robots Project January 20, 2026
  • A Must-Watch Video Showing Dangerous Construction of Cheap Lithium-Ion Cells January 20, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise