Connect with us

Pull Up Resistor

Discussion in 'Microcontrollers, Programming and IoT' started by vick5821, Feb 7, 2012.

Scroll to continue with content
  1. vick5821

    vick5821

    700
    0
    Jan 22, 2012
    Hi,

    I understand about simple pull up resistor.To keep the pin HIGH when the button is not being pressed so it is not connected to GND.

    However, if let say I connect a LED from RB0 to a resistor then to GND , how can I apply the pull up resistor concept in this case ?

    Thank you
     
  2. Rleo6965

    Rleo6965

    585
    9
    Jan 22, 2012
    I don't think you need a pull up resistor in RB0. It was set as output and also you already have pull down resistor connected to the LED to Gnd. You need only to place pull up resistor in Input pin of PIC. But its also depend of your program to expext in its input i.e. High or Low input.
     
    Last edited: Feb 8, 2012
  3. jackorocko

    jackorocko

    1,284
    1
    Apr 4, 2010
    Look at it like this, You use a pull-up/dn resistor when you need to set the state to anything other then floating. What state that is will depend on its purpose.
     
  4. vick5821

    vick5821

    700
    0
    Jan 22, 2012
    This is when I need to add a button/switch to it ?
     
  5. jackorocko

    jackorocko

    1,284
    1
    Apr 4, 2010
    It can have everything to do with a button or switch or nothing at all.
     
  6. vick5821

    vick5821

    700
    0
    Jan 22, 2012
    The purpose is either to set the pin to be in HIGH or LOW state forever ?
     
  7. jackorocko

    jackorocko

    1,284
    1
    Apr 4, 2010
    Yes, it will be in either one of the two states forever(but it can change states, circuitry dependent), but it will never be floating.
     
    Last edited: Feb 8, 2012
  8. Balrock

    Balrock

    39
    0
    Mar 1, 2012
    Have a look at the following diagram of my mE board. It uses a 10k with the switch and a 4k7 with the LED.

    http://www.mikroe.com/eng/downloads/get/312/easypic6_schematic_v101.pdf

    Acording to something I read switches must be tied high or low (depending on what is required) When I had my project switches not set to tie the port low it couldn't read the logic state of the button properly.

    I am no expert though but the diagram should help as I have found from experience it works in the real world.
     
  9. vick5821

    vick5821

    700
    0
    Jan 22, 2012
    Do you have link ? I wanna read too ><
     
  10. Balrock

    Balrock

    39
    0
    Mar 1, 2012
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-