Common Anode 7 segment display:internal pullup on all 8 cathode pins ok?

I have a 7-segment Common Anode display I got off spark fun. It has 5 pins at top, 5 pins at bottom. Center pins get +5v(common anode) and the remaining 8 pins(cathodes) when grounded, through a series resistor, will light up.

So I know the arduino has internal pullup resistors and if I used let's say, digital pins 2- 10, couldn't I simply set them as all pull ups and then set them low whenever I want to switch it on? I just don't know what the Arduino's limits are when it comes to it's internal resistors.

It's that or add my own pull up resistor on every single pin...which sounds like a pain if I can use internal ones.

The internal pullups are not used when the pins are used outputs. An output is either high, which means both ends of the LED are high and thus the LED is off, or an output is low, and current is pulled thru the LED to turn it on. Current limit resistor is needed for each segment.

CrossRoads: The internal pullups are not used when the pins are used outputs. An output is either high, which means both ends of the LED are high and thus the LED is off, or an output is low, and current is pulled thru the LED to turn it on. Current limit resistor is needed for each segment.

That you very much for your help. So just setting all those pins to High and leaving them like that won't burn anything out? Oh really, each one. Ok. What do you think about the resistor size? I googled it and came across a tutorial on spark fun. https://www.sparkfun.com/tutorials/219 It gives this basic formula: (Source 5V - forward voltage drop 3.3V)/.02A(forward current in amps) gives 85ohms. * So I'll just put a 100ohm one one each. Hows that sound?*

(5-3.3)/100 = 17mA

Next have to consider Table 29-1, Note 4:

Although each I/O port can sink more than the test conditions (20 mA at VCC = 5V, 10 mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100 mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100 mA.
3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100 mA.

So #2, D5-6-7,B0, that total is <100mA
and #3, D2-3-4, that tota is <100mA,
so that current and those pins should be fine.

I actually don't have the proper calculated resistor. I was just trying to use what I have. If it reduces the current by 3mA, oh well.

As for the rest of what you typed...you lost me there. I'm very new to some of this stuff, sorry. I'm assuming those are the technical labels for the pins, I'm just not sure which ones they are or what IOL means. But what I did understand was the current on my pins should be fine. :) Thanks!

red913: . But what I did understand was the current on my pins should be fine.

A pity because that is not what he said. A current of 20mA is fine but the sum total of all currents is a bit more complex. So while each pin can supply 20mA you can not get 20mA out of all the pins at once. Look at the port mapping pages on this site to see what pin numbers correspond to what port numbers.

Grumpy_Mike:

red913: . But what I did understand was the current on my pins should be fine.

A pity because that is not what he said. A current of 20mA is fine but the sum total of all currents is a bit more complex. So while each pin can supply 20mA you can not get 20mA out of all the pins at once. Look at the port mapping pages on this site to see what pin numbers correspond to what port numbers.

Ok, thanks. I took a look at the pin mappings. I got that figured out. So if I do 4 pins on 4-7 and the last 4 on 8-11 that will evenly distribute the pins, and theoretically the load, among ports B and C.

But let's say all 8 pins are off(power from segment pins grounded through Arduino pins set low)and I'm sinking that full 20mA from each pin. It says the sum of those ports can't break 100mA. So I don't see how that would happen. Would you be able to elaborate for me please? I know you said the sum total is more complex. So I'm assuming it's more than 20+20+20+20=80.

I don't think you have it figured out yet, or we not quite discussing the same thing:

D4-7 is PORTD 4,5,6,7 D8-11 is PORTB 0,1,2,3

2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100 mA.

So 140 of your 160 is on B0-1-2-3 and D5-6-7. That's a problem.

I was looking at this.

Ya, sorry I'm doing too many things at once here at home. So with keeping with:

1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100 mA. 2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100 mA. 3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100 mA.

Put 4 pins on C0-C3(Analog 0-4) & 4 pins on B0-B3(Digital 8-11)

How's that sound?

That being said, back to my previous question. Someone here had just said I can't get 20mA out of each pin all at once. I think it is possible, right?

With B0-3 and C0-3, 20mA on all 8 pins is acceptable.

Total limit for the chip is 200mA, so pay attention to where the other 40mA are going - including 9+mA for the 328P itself.