the issue is I can only get it to display all the same numbers 33:33 44:44 etc…
has anyone used one of these before and have any pointers on how to get different numbers? the spec sheet got me as far as the base numbers, but I can’t understand it well enough to see how to do multiple different ones.
Say you want to show the number 12:34, you drive segments A to G to show number 1, and drive the common cathode (or anode, depends on the display) of the first digit,
then you show 2 on the second digit, 3 on the third and 4 on the fourth.
If you repeat that sequence fast enough, say > 50 times a second, your eye will see 12:34.
The datasheet says these are common cathode devices so the common goes to GND. Yes, use a NPN transistor driven by the Arduino for each common line (digit). Use a 1K resistor connected between the Arduino and the base of transistor. The emitter goes to GND and the collector to the common wire of the display.
so the other non common pins go to the data output pins of the arduino and that’s what supplies the +5v correct?
I’m a little confused as to where the led resistor goes though, I get that there should be one between the transistor and arduino, so the pin of the NPN tied to ground should have a resistor as well correct?
leon_heller:
You need a resistor between each output from the MCU and the segments it is controlling.Leon
Good catch, Leon. I’ve been multiplexing a single segment at time for so long that I forgot that important requirement. And I’m the one that is always reminding everyone to use current limiting resistors when driving LEDs. :oops:
fyrebug, you need a resistor (470 ohms should do) between each Arduino output pin and each of the 7 segments (8, if you count the decimal point). Then you connect the transistor as I described before to each digit. There is a 1K resistor from the Arduino output pin and the base of the NPN transistor.