Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Pull-up / Pull-down Resistors

:: EPE Chat Zone ­:: ­Radio Bygones Message Board :: » EPE Forum Archives 2007-2009 » Archive through 15 January, 2007 » Pull-up / Pull-down Resistors « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Tom
Member
Username: Tom

Post Number: 6
Registered: 10-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 07:50 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Can anyone explain why we need pull-up or pull-down resistors when connecting a switch to a PIC.
How do you calculate the value of the resistor?
One book I read had values for pull-up rsistors varying between 1k and 100k for similar circuits.
Top of pagePrevious messageNext messageBottom of page Link to this message

Chuckieboy
Frequent Contributor
Username: Chuckieboy

Post Number: 78
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 08:14 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

The idea of pull up/down resistor are to stop the pins remaining in a float state which can lead to fasle triggering, I normal use either 10k or 4k7 but i use 10k and fine it work ok, but it alpends on your application,

hope that answer your question

chuckieboy
Top of pagePrevious messageNext messageBottom of page Link to this message

Joe
Frequent Contributor
Username: Joe

Post Number: 266
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 08:33 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

On some PIC's, actually all the one's I've used, PORT B has built in Pull-Up resistors for exactly this use.
Unfortunatly, it's all of PORTB or none of it AFAIK.

There's a register bit that controls if they are selected or not.

Joe
Do one thing each day that scares you – work here !
Top of pagePrevious messageNext messageBottom of page Link to this message

Obiwan
Frequent Contributor
Username: Obiwan

Post Number: 1367
Registered: 12-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 09:58 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Those "internal" pull up resistors are known as "weak" pull up. Meaning it doesn't take all that much to over come them. I guess they're intended to be just enough to keep the input from floating.

(which can also cause other issues, and high current drain)

So again, it's going to depend on your application.

As far as calculating them.... hmmmm.

I think part of it is what you have on hand. And your circuit.

You want something that will hold a steady state, like a one or a zero. Something your circuit won't force a state change, unless it's intended.

But you don't want it too strong (low value), that it can't be forced into a state change, or pulls too much current.

I've used just about everything, but generally 4.7K up to 100K works out well, again, depending on your circuit. They all have to work together.

I have never considered what would happen if you had those internal pull up resistors in parallel with off chip resistors.

I guess it would be the standard parallel formula eh? You'd end up with a smaller value then you intended though. Have to watch it, make sure it's off when you have external pull up's.
Do Not Hit The Fly That Lands On The Tigers Head.
Top of pagePrevious messageNext messageBottom of page Link to this message

Joe
Frequent Contributor
Username: Joe

Post Number: 267
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 10:12 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Those weak pullups (according to the data sheet) are 200uA which at 5v is 2.5K ?

I'm terrible with maths and DP's...
Do one thing each day that scares you – work here !
Top of pagePrevious messageNext messageBottom of page Link to this message

Obiwan
Frequent Contributor
Username: Obiwan

Post Number: 1369
Registered: 12-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 10:44 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

25K
Do Not Hit The Fly That Lands On The Tigers Head.
Top of pagePrevious messageNext messageBottom of page Link to this message

Istedman
Frequent Contributor
Username: Istedman

Post Number: 86
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 09 January, 2007 - 11:06 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Hi,

Stronger pullups/downs (lower resistances) give the input circuit better noise resilience. It in part depends on your application.

I have seen inputs (JTAG buffers) with a 10K pull up that in a noisy environment, changed from <2V to about 1V and caused a device to do undefined operations! Chanking to 2K pull ups cured the problem ;)

The pull up resistor and I assume a switch to 0V is so that once you have released/opened the switch, the input will return to a logic 1 after a period of time.

The time period to go from close to open is simply T=RC where R= your pull up resistor and C = input capacitance of a PIC pin, typically 15 pF. Follow the maths.

If you are looking to use a PIC I/O pin for both functions, you will not want to load the pin too heavily when it is operating as an output, in this instance 100K pull ups are seen with perhaps 1K in series with the switch.

Just don't forget Ohms law.

Ian

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page