IC for interfacing 7-segment display with attiny85

Hi all!

I am looking for an IC to interface a 4-digit 7-segment display with an Attiny85. I found the MAX7219, but it is for 8 digits. Is there anything similar for 4-digits? If not, I guess I could use the MAX7219.

Thanks in advance!

It is a bit expensive, but I have used the Sparkfun serial 7 segment 4 digit display for projects that I sold. Very easy to use with a tiny85.

Definitely on the pricey side at $14 :grimacing: . I am trying to keep it below $4 (display and IC), because I am looking at making a lot of this project.

A quick look on AliExpress, and you can get a 4 digit LED module using a TM1637 controller with Red, Blue, Green, Yellow or White display for 0.81 GBP (just over 1 USD) each + a bit of shipping.

Some sites show the price of MAX7219 as: $5 - $6.

As ATTiny85 supports SPI Interface, it can be easily interfaced with MAX7219 to drive 4-digit cc-type 7-segment display unit (Fig-1).


I am trying to have everything on one PCB, instead of separate modules with wires connecting them. I'm also looking for the IC to be through hole if possible, for easier soldering. FYI, this project is supposed to be a DIY kit. I did find the TM1637 IC, but it is SMD, and out of stock from my supplier.

I can get the MAX7219 for $2.5. I have already made the circuit with the MAX7219 only running 4-digits, but I was wondering if there was anything equivalent that is cheaper, since I only need 4-digits instead of 8.

You configure MAX7219 for 8-digit; but, physically connect 4-digit.

Yes, that is what I did. I mean, since the max7219 can do 8-digits, and I don't need that, maybe there is something cheaper that can do 4-digits.

If you're using common cathode, you can multiplex by segment, and use a 74HC4017, but you would need five GPIO pins for that (one for each digit, plus one to clock the 4017). And of course your software would need to do all the refreshing. $.89 at Digikey.

@ShermanP Thanks for the idea. I could use an Attiny84 instead, to fix the amount of pins problem with that idea, but the cost would even out in the end between the driver IC and the microcontroller.

Following that logic, why not use atmega328? Attiny84 + 74hc4017 is 30 pins to solder, atmega328 is 28 pins. Remember, if you use 8MHz internal clock, you get 2 more pins to use as digital I/o. Add 4 small transistors (bc327 for common anode display, bc337 for common cathode) to drive the display commons.

Or, if you have efficient displays, so that one GPIO could drive four segments at a time, you could still use multiplexing by segment, and you wouldn't need the transistors or the segment resistors - just one resistor for each of the four common anode or cathode pins.

1 Like

you could use an i2c output expander? Like an MCP23017 16-pin expander.

You could, yes. But those are 28 pin chips, same as atmega328. And I doubt the difference in price between an attiny85 and atmega328 would be more than an mcp23017.

In short, no!

Well, the TM1637 is intended for 6 digits, but generally used for four, but either you use the module available, or just stick with the MAX7219.

You can configure it for less digits

Thanks everyone!

I think i'll just stick with the MAX7219. What do you all think of this schematic and 3d designs?

Did you forget the mandatory two caps on the HE6350MPR regulator,
and it's 18volt absolute max input voltage (not 30volt),
and the decoupling caps for the ATtiny85.

I think you could make a PCB the same size or smaller, by using a bigger AVR that wouldn't need a separate decoder...
Maybe an ATtiny861 (which even seems to be unpopular enough that you can still buy them!) (Supported by Spence's ATtinyCore)