ATmega1281 - pin current question

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

Hi all !

I would like to drive optocoupler with GPIO pins and what concerns me is how many mA can port give me.

Reading datasheet p.367 at top of the page:

DC Current per I/O Pin ......... 40.0mA
DC Current VCC and GND Pins..... 200.0mA

Optocoupler can be driven in 2 ways, like in picture.

I think that 2nd pitcure(inverting) is better way to do it.

So GPIO pin can give and lets say receive 40 mA?

Thank you !

Attachment(s): 

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

You quote absolute maximal rating (Atmel guarantees that you will not permanently damage the uC with 40mA). But the tested performance is only characterized up to 20mA per IO.
The right picture is right. Even though AVRs have ~symmetrical IO drives, the P one is slightly weaker than N.

Quote:
So GPIO pin can give and lets say receive 40 mA?

The short-circuit IO current is about 100mA if you forget that series resistor (Rds_on is below 20 ohms) but that is out of any specification.

No RSTDISBL, no fun!

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

I'm confused (but I'm not a sparkie). If you have the same +V on both sides of the optocoupler, what isolation are you getting?

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

xtal_88 wrote:
I would like to drive optocoupler with GPIO pins and what concerns me is how many mA can port give me.
What optopcoupler will need to draw more than 10 mA?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]