Does the atmega8a can tolerate the current of two 7-segments ?

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

I'm making a digital dice with two 7-segments and an atmega8a

I want to connect 7-segments directly to Atmega8a pins with a 330 ohms resistor for each pin

As I measured, each segment has 5 mA consumption, and a 7-segment displaying numbers between 1 and 6 consumes a maximum of 30 mA, which is 60 mA for two 7-segments.

Due to  Atmega8a datasheet, the maximum tolerable current of each pin is 40 mA and the maximum consumption current of atmega8a can be up to 300 mA

 

is driving these two 7-segments with an Atmega8a a standard method?

would this method harm atmega8a in a long period of time?

 

 

This topic has a solution.
Last Edited: Tue. May 4, 2021 - 11:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds fine to me but note that often displays are "multiplexed" to save pins. If you do that then even if you display 8.8. only one lot of '8.' would actually be illuminated at any one moment - but you switch between them so fast that it looks like they are all on at the same time.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

So this is the part you need to pay attention to:

https://ww1.microchip.com/downloads/en/DeviceDoc/ATmega8A-Data-Sheet-DS40001974B.pdf - page 233; notes to Table  26.2,  "DC Characteristics"

 

So your total of 60 mA should be fine.

 

is driving these two 7-segments with an Atmega8a a standard method?

If you have enough port pins, yes.

 

If you're short of port pins, and/or want more digits, then as clawson said, multiplexing is the way to go ...

 

would this method harm atmega8a in a long period of time?

no.

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

Sounds fine to me but note that often displays are "multiplexed" to save pins. If you do that then even if you display 8.8. only one lot of '8.' would actually be illuminated at any one moment - but you switch between them so fast that it looks like they are all on at the same time.

thanks for your reply

previously  i used two 74hc595 to drive the 7-segments but i removed them to avoid a complex two layer pcb

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

awneil wrote:

 

So this is the part you need to pay attention to:

https://ww1.microchip.com/downloads/en/DeviceDoc/ATmega8A-Data-Sheet-DS40001974B.pdf - page 233; notes to Table  26.2,  "DC Characteristics"

 

So your total of 60 mA should be fine.

 

is driving these two 7-segments with an Atmega8a a standard method?

If you have enough port pins, yes.

 

If you're short of port pins, and/or want more digits, then as clawson said, multiplexing is the way to go ...

 

would this method harm atmega8a in a long period of time?

no.

 

 

 

thanks .

i use DIP package

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

I wrote:
If you're short of port pins, and/or want more digits, then as clawson said, multiplexing is the way to go ...

or, if that's still too many pins, an external driver; eg, the  74hc595  previously mentioned, or something on I2C or SPI ...

 

Of course, nowadays 7-Segs are passé - GLCD is the way to go ...

 

wink 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
GLCD
Which decade are you living in? I would have thought OLED was de rigueur? cheeky