internal pull ups

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

hi @ all!

I'm definitive not a newbie in this avr stuff, but I have problem and no explanation!
May be my mind is messed up in the meantime!

I enabled all pull ups on an attiny13 connected to my pc via jtag ice mk-II debugwire! I've LED's connected to the IO's and I can see, that I have really a pull up effect: the led's are smoldering!
But, when I read out PIN registers I can not see any "high - info"! Everything is zero!

why???

best regards

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

But are they configured as inputs?

The Dark Boxes are coming.

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

Pullup is NOT strong enough to turn on an LED. Well, maybe very faintly, but not "smoldering"! The only way for this to be even close is for those pins to be set as outputs.

But, even that does not make sense because outputs are current limited to make it easy to drive LEDs with no current limiting resistors. There should be no "smoldering" at all. Check that you have not connected your LEDs direct from power supply to ground!

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

I recoment to have VCC to LED to Resistor to I/O Pin.

Where the I/O pin is set to output and you enable it with a Low level value. also limit the current with the resistor value.

Hope it helps.

---
ARod

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

ok, may be it was not cleared enough!

I have io's on my attiny13! They are normally outputs (connected to led's), but during startup and initialisation they are inputs for setup purpose! To have the possibility to set a jumper and make some user inputs!
During this startup phase the io's are defined as inputs and the pull ups are enabled! this jumper should pull the line down! One of the 4leds is smoldering (sorry, english is not my "mothers language" and I'm not sure, if it's the right word, it lights, but just a bit) I took just 4led's out of my box! they are not the same! I guess, this one is low current led! if i disable the pull up it will stop smoldering!

regards

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

Yes, "flickering" (turning quickly on and off) is certainly possible with an LED and 30k pull-up.

("smoldering" is "to burn and smoke without flame". So a fire can smolder or flicker and mean about the same thing. For an LED, however, flickering and smoldering can be quite different. :) Consider especially the "smoke" part. )

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

I know English is not your mother tongue, so no offence, but the word you want is probably "glowing".

Four legs good, two legs bad, three legs stable.

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

John_A_Brown wrote:
I know English is not your mother tongue, so no offence, but the word you want is probably "glowing".

:!: 8)

ok, my led is "glowing" (thanks)
but any ideas, about my problem?

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

Quote:

But, when I read out PIN registers I can not see any "high - info"! Everything is zero!

I don't really see a "problem" with what you described.

--it is very possible for the LED to flicker or glow with the Vcc through the (about) 30k internal pull-up
--at that point, putting a meter or a 'scope on that port pin may very well show a voltage level below the AVR "guaranteed that a 1 is recognized" level. IIRC this is 0.6Vcc for most AVRs.

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

OK, so we have established that its not an issue of the LED getting really, really hot.

It is appropriate to ask whether or not the faint light causes a real problem during startup. If jumpers are being read during this time, then it is a somewhat extraordinary case, and most people would not mind things being just a little different. After all, many appliances go through a startup sequence with various lights flashing on an off. Even my car does that!

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

theusch wrote:
Quote:

But, when I read out PIN registers I can not see any "high - info"! Everything is zero!

I don't really see a "problem" with what you described.

--it is very possible for the LED to flicker or glow with the Vcc through the (about) 30k internal pull-up
--at that point, putting a meter or a 'scope on that port pin may very well show a voltage level below the AVR "guaranteed that a 1 is recognized" level. IIRC this is 0.6Vcc for most AVRs.

Lee

ohh, yes!

sure, pull ups are enabled, but the leds pull them to gnd! 30k! of course! it can not work!

sorry, guys! I'm doing not very well at the moment!
excuse me! :oops:

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

Wouldn't the load from the LED via the 50K internal pullup actually pull the I/O pin down so you dont read the expected "Logic 1"

Try to disconnect the LED and see if the PIN doesn't read "Logic 1" after that

Edit: Beaten by OP at the above post (it was no there when i started my ansver) :oops:

/Bingo

Last Edited: Wed. Nov 9, 2005 - 09:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can have your cake and eat it to:

--Connect your LEDs to Vcc, and then to AVR port pins through a suitable current-limiting resistor
--To turn them on, have the AVR port pin be an output with 0 value and sink the current; to turn them off make it an input or output with value 1.
--During the startup/configuration, make the AVR pins inputs (with or without pullups may not matter). If the configuration switch is "made", have it connect to Gnd. You will read a 0 in the PIN register, and the LED will also turn on to indicate which switches are "made". :)

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

theusch wrote:
You can have your cake and eat it to:

--Connect your LEDs to Vcc, and then to AVR port pins through a suitable current-limiting resistor
--To turn them on, have the AVR port pin be an output with 0 value and sink the current; to turn them off make it an input or output with value 1.
--During the startup/configuration, make the AVR pins inputs (with or without pullups may not matter). If the configuration switch is "made", have it connect to Gnd. You will read a 0 in the PIN register, and the LED will also turn on to indicate which switches are "made". :)

Lee


good idea, but the led's are connected to the gate pin of an N - Fet! So if I connect it, as you told me, than I would have a lighting led, when the fet is off!
"you could take a p - fet"
"yes I could, but then I would need a fet driver, because the target voltage could be higher than the supply voltage of the controller"

best regards