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.

comsuming mA from uC pin

Status
Not open for further replies.
I think the LED currents are WAY higher than only 6mA. Mike read the datasheet where is said that when Vcc (the power supply voltage) is only 3V then the output current is only 6mA. But when Vcc is 5V then the maximum output current is higher than 20mA.

Looking over the data sheet, I fail to see any of the above. The only thing I see that even comes close is when Vcc = 3V, then Icc (power supply current) is a max of 5mA when active at 4MHz. And what Icc has to do with output current????? (except that any current sourced on the I/O pins will add to the 5mA max current)...

The part is rated at 40mA max I/O pin current, NO MATTER WHAT THE Vcc IS. This is an absolute rating and should not be exceeded, or even designed for. The I/O pins are rated differently at 5V and 3V, 20mA and 10mA, respectively, but this is just to spec the Voh value. You can still drive the output at 20mA (or above) with Vcc = 3V, they just don't guarantee a Voh of 2.2V min, and it'll probably be lower, not necessarily, just probably.
 
Last edited:
The datasheet for the microcontroller says that the max output current is greater than 20mA when Vcc is 5V and is greater than 10mA when Vcc is 3V.
I missed seeing that the OP is using 520 ohm current-limiting resistors since most of this thread talks about having too much current.

The graphs of 74HCxxx output currents show 68mA typical into a short when the supply is 6V but the max allowed output current is only 25mA.
The outputs drop some voltage when loaded which makes them get hot.

My 6V Ultra-Bright Chaser project uses a 74HC4017 IC to drive 10 LEDs. I limit the current to 24mA. Only one output is used at a time and only for a moment so the IC does not get warm.
 
The datasheet for the microcontroller says that the max output current is greater than 20mA when Vcc is 5V and is greater than 10mA when Vcc is 3V.

See the absolute max ratings. There you will find the 40mA rating. You have to read the whole datasheet.

atmega8_electrical specs.JPG
 
AND...

just because the absolute max rating is 40mA per I/O pin, doesn't mean the part won't source more than that, as the Dr found out in post #10. The uC doesn't limit the max current, YOU have to. What the data sheet is saying is that if you go over (or even close to) 40mA, all bets are off.

and on your 74HC4017 data sheet, just because the output will source 25mA, if you bring the pin higher than 5.5V (or VCC + .5V) with a current limit of 25mA, you'll blow the clamp diode, as they'll only take 20mA (look at the 25mA spec, it clearly states Voh < Vcc + .5V).

And what the test spec is saying is not that the part will source 20mA @ 5V or 10mA @ 3V. It is spec'ing the Voh level at those currents with those Vcc's, and guaranteeing a minimum Voh for those currents at those Vcc's. It could be higher, but that is the minimum levels. That is why I use Vcc when doing my calculations, worst case scenario. (I suppose I should've used 494 ohm because of 5% resistor, but just know current calculated will be +/- 5%.)
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top