These days they’ve been replaced with character LCD displays or even brightly colored graphical displays, but if you’re trying to display data on one of your projects, there’s nothing like the classic red glow of a red seven segment display. [five volts] got his hands on a few ancient segmented displays, but controlling even one took up more microcontroller pins than he was ready to spare. The solution to this problem was to use a shift register and control multiple segment displays with an 8 pin microcontroller.
[volts] is using an ATtiny13 to control six seven segment displays. Each display is mounted on a hand-etched board, with a shift register and a handful of resistors soldered to the back. By having the microcontroller shift bits down the line, [volts] created an extremely easy to interface 6-digit segment display, and the entire device can be expanded even more.
The board files and schematics are available on [volt]’s project page. A great project if you’re just starting out to etch your own boards.
22 thoughts on “Lots Of Seven Segment Displays With A Single ATtiny”
With a plain shift register, you’ll get unwanted segments flashing up when the display changes. A better device would be the 74595 which is a shift register with an extra output latch that allows you to cleanly switch all outputs at the same time..
latches, flip-flops, shift registers… brings back memories of school. I kind of miss the old days even if things are easier nowadays with super cheap high powered chips
Shift registers are still in common use…
Not in hack a day articles
There are special signage drivers now with built in 16bit grayscale.
Or just gate the common pins on the LEDs with a transistor, to provide blanking.
And that gets you an easy dimming control too!
Actually, using the ShiftPwm library of Arduino could do even more than just dimming.
@kubik Have you used a tiny13? Do you know the space restrictions? Relegate that to hardware, for sure. :P
but, to the post itself, I was so glad to see it wasn’t something like the 2313, just for the crunch factor of limited pins.
Exactly. The 595 is the standard device for that. He’s rediscovered what we’ve been doing for 10+ years. It’s also a good way to control a large number of individual LEDs with few MCU pins. For example, all the network status LEDs (activity, speed) on large network switches.
meh, i was able to drive 10 digits with just a 2313, 74hc238, and a 74hc595. though i still need to make my serial interface code a little bit smaller to fit into the 2313’s, tiny flash.
Say what!? You have problems fitting code for driving ten 7-seg displays and some serial stuff in 2K flash, are you writing the code with boxing gloves on? :-) A few hundred bytes sounds more reasonable if written in C.
its more a matter of being too lazy to write a lightweight serial protocol.
Or just use a single MAX7219 7 segment LED driver chip that covers constant current and 8 digits.
And it only requires one resistor to limit the current for all of the segments.
Yeah. The MAX7219 is so much easier to deal with. SPI input. Cascade up to 255 parts (I think). Way easier than putzing around with some shift registers. Your time is worth something. Can’t get that back.
I’d rather buy some 595s at a few cents each locally than have to order in a MAX7219 from Digikey and pay $50 shipping to my country. Not everyone lives in USA.
eBay is your friend. You can pick up MAX7219s for about 70-80 us cents each, including postage. Add the fact that you only need a single resistor and its cheaper than using shift registers.
Widely reported those MAX7219’s on ebay are Chinese fakes. I live in the 3rd World, getting fancy parts is nearly impossible – I wish more understood this.
I’ve got a few for about a euro and a half a pop from ebay. For fakes they work quite damn well.
I buy lots of components from china. Can’t remember ever getting one that didnt work. I guess it costs just as much to make a fake as it costs to make the real thing.
the Max7219 cost 40 euro cents including shipping if you buy 10, but yes, HC595 costs only 6.5 eurocents including shipping… if you get a 100.
Have used both
Has anyone any experience of running more than 30 x 3 digit 7 set displays. I’m trying to power 33 displays that have to display a 3 digit code for each location.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)