Highest Possible Pull-down Resistor Guaranteed to Work

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm just wondering what the highest pull-down resistor I can choose to pull-down an input pin on a standard AVR is? (ATtiny2313A to be exact). I'm not anticipating these pins going high, but seeing as the ports start-up as inputs I'd like to prevent any excess current I can.

Thanks,

Trevor

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've used around 1Mohm without problems. If the pin is unused you can also set it as output.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From datasheet chapter 21.2 the max. input leackage current is 1µA.
For supply voltages in the range of 1.8V to 2.4V a input is read 0 if the voltage is below 0.2 * VCC.

So at 1.8V the pulldown resistor can be max. 0.2 * 1.8V / 1µA = 360 kOhm

Regards
Sebastian

EDIT: Corrected result to 360 kOhm

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm a bit lost. If an unused pin, then hard-tie it to Vcc or Gnd. And don't set it as an output. And in this case I don't want to hear "Yahbut, what if it 'accidentally' gets set to an output?" In any app if you mis-configure any pin output/input your app isn't going to run properly, and/or can damage the AVR or attached components.

Or, if a floating pin, set the internal pullup.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks again Sebastian.

theusch:
Some of these pins actually need to be tied to ground so I can detect if it is high on start-up. As for hard-tieing a pin to Vcc or GND, I'm not necessarily going to be the one programming this thing, so I'd rather not have to deal with that in the future.
I'm also trying to use as little power as possible so internal pull-ups are out of the question.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
If an unused pin, then hard-tie it to Vcc or Gnd
Is there a benefit? Why would you not just leave unused pins unconnected and set them as outputs?

I can only think of better EMC immunity, but I'm not completeley sure about that.

Last Edited: Wed. Apr 14, 2010 - 03:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TrevorP wrote:
Some of these pins actually need to be tied to ground so I can detect if it is high on start-up

If you could reverse the logic, then you possibly can save even more power:
Connect the pins to GND instead to VCC (via switch, jumper, etc.)

- On start-up activate the internal pull-up of the AVR
- read the corresponding PIN register. If pin is low then the switch/jumper is active
- if pin is low, deactivate the internal pullup
- if pin is high, keep the internal pullup active to avoid floating

This way current is only flowing for the short time the internal pullup and the switch/jumper are active.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, I'm not sure that's gonna really work well. I should have mentioned that in the event that the pin is high at start-up then the AVR will have an external power source powering the entire system (in order to retrieve data after the fact). The high pin is actually an indication that a USART line has been attached to RXD. So reversing the logic would just complicate things.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'm not necessarily going to be the one programming this thing, so I'd rather not have to deal with that in the future.

Huh?
Quote:

I'm also trying to use as little power as possible so internal pull-ups are out of the question.

Huh?

Quote:

Some of these pins actually need to be tied to ground so I can detect if it is high on start-up.

Huh?

Are these pins under discussion floating/unconnected or not?

If not, tell what they are in fact connected to.

NB: I just realized that there are new 20-pin Tiny models floating around. The Tiny43U may be interesting for certain apps, with the integrated charge pump. (And some in stock at DigiKey) I haven't figured out the Tiny87 family yet but those appear to be still phantoms anyway.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Posts got interspersed, and now I understand the situation. An interesting situation. AVRs don't have internal pulldown so you can't do a quick test with that. And if floating leakage current or whatever could show it as a logic high.

If you have a spare I/O pin then you could connect your weak pulldown to that, and only make it a low output during your startup test.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.