Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pull up what"?

Status
Not open for further replies.

Dr_Doggy

Well-Known Member
k, so whats the deal with these pull up resistors, and what about the pull down ones, k i get it, but do i need to do it to every pin? how do i know when to use one?

and what value do i use? iv just been using 10k so far?

these crazy little chips start turning each pin on from the static of the previous pin!
 
k, so whats the deal with these pull up resistors, and what about the pull down ones, k i get it, but do i need to do it to every pin? how do i know when to use one?

and what value do i use? iv just been using 10k so far?

these crazy little chips start turning each pin on from the static of the previous pin!
The idea of a pull up, or pull down, is to set a voltage level on the pin. There is no current flowing, so the size of the resistor is not critical. If the pull up is on a switch, the switch completes the path to ground, and current then flows through the resistor; you may want to calculate how much current, and set your resistor value on that.
If you don't tie an input high or low, there is no telling what state it will be in, so best you decide, and make it so.
Those high impedance inputs, sort of act like little antennas, and flop all over when left unattended, so you should baby sit them with your choice - a 1 or a 0.
:)
 
You only need a pull up/down if the pin will be an open circuit input such as a push button. Many Pics have internal pull ups that you can turn on. The value of the internal ones is around 20k.

Mike.
 
so ALL input pins need to be pulled??
is it normal for a untied input to feedback off another pin?

and what about pins that are wired to other IC's (specifically i am having problems with a CM8870 wired to a 18F4620 on port; C.0, C.1, A.7, A.6, I AM getting similar results from it( i know that is problem cause i short out one pin and the rest follow) , what else could it be?

and wats the deal with impedance matching? is that a fancy way of saying you cant feed an input to an input?
 
PULL-UP RESISTORS
All PIC microcontrollers have pins that can be turned into input and/or output lines. When a pin is turned into an input, it is similar to the base of a transistor. You can take the line HIGH or LOW and the microcontroller will detect the voltage level.
But the input line is more-analogous to the input of a FET transistor. The input line is extremely high-impedance and will detect static electricity in the air - just like the input line (GATE) of a FET transistor.
This is where the similarity between the input line of a micro and a FET and transistor ends, because the input pin of a microcontroller has an exclusive feature.
It will detect a HIGH when the voltage is about 1.2v (and higher) and will see a LOW when the voltage is less than about 1.2v.
As you can see, the input pin of a micro will detect static electricity because its impedance is extremely high.
If this pin is connected to a switch, the input will see a LOW when the switch is pressed but when it is not pressed, the wiring to the switch will pick up static electricity and the micro will not know how to interpret this.
To make sure the input line changes from one state to the other when the switch is pressed, a resistor is connected between the input and the positive rail.
This makes the pin HIGH when the switch is not pressed and it goes LOW when the switch is pressed. The resistor also has a secondary effect. It lowers the impedance of the input line and prevents static electricity building up and altering the state of the input. Any static electricity entering the line will be taken to the positive via the resistor. This is called "bleeding." Even a very high value resistor will work in this situation.
This resistor is called a PULL-UP RESISTOR as is pulls the input to the voltage of the supply.
It should be called a HIGH STATE or LOW STATE RESISTOR because it is not pulling up anything. In original digital chips, the input line was biased at about mid-rail and it required a resistor to pull the input above mid-rail. That is where it got the name: PULL-UP.
The pins on a microcontroller only become inputs when your program turns them into inputs. When a pin is turned into an input, you must make sure it has a pull-up or pull-down resistor to prevent static altering the state of the pin.
All PIC microcontrollers have a feature where an internal 47k resistor can be connected to the input of some pins and this eliminates the need for an external resistor. These are called 47k pull-up resistors.

 
Colin, that is a extremely good explanation of Pull-up and Pull down resistors. Thank you for such a clear and concise answer.
Bob
 
If you set the unused pins up as outputs in your code you don't even need to worry about using pull up/pull down resistors. Once they're configured as outputs, writing to the port latch via writing a byte to the port register determines what state those pins will be in.

Set them up as outputs, then use byte values that keep the unused pins in the low state.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top