controlling a 7 segment display with a attiny85

I have some attiny85's I wanna use with my one 7 segment display. Does anyone have a schematic that shows how to wire it up and some code that does something basic like count down or something similar. Thanks!

OK, so let's get this sorted.

A Tiny85 is an eight pin chip, so at the very most, you have 6 available control pins.

Now a 7 segment display has eight segments including the decimal, so you need eight control pins to fully utilise it or seven if you fancy you don't need the decimal. You are short at least two pins, and if you want to control the display, even more so.

So you could use a shift register like a 74HC595 and if you really want to do that, well, just Google for 7 segment and 74HC595. That will take three control pins - there are ways of fudging it to use fewer.

OTOH, a MAX7219 (datasheet) would do the job even better, and in fact, could drive eight such displays whether common cathode or despite popular misinformation, common-anode.
..
.
However, before rushing off and buying such a chip, you would be even better off to buy from eBay, a complete module with a matrix display which you can un-plug and connect one or more 7-segmentt displays

or for the same ridiculously low price, an eight digit display.

And again, it only ever takes three pins (even for multiple MAX7219s). So there you go!

Paul__B:
despite popular misinformation, common-anode.

without additional hardware? spec seems to indicate otherwise. if so can you provide more details?

With common anode vs common cathode, you would be multiplexing by segment (across all digits) vs multiplexing by digit. Have to use no-decode mode and do some coding to account for that, taking into account that data written to data register 1 now appears as segment A across the 8 digits for example, vs being the segment data for digit 0.

thank you for explaining that. ive been using lots of these, specially the exact module paul linked, for couple years and never occurred to me seg/dig could be switched. ive been relying on the built in char gen so far but maybe time to bypass that and build some tables. might be worth it to make use of the cheap bigger displays which are mostly common anode.

i use a lot of multi digit 7 seg w/o any controller and also with the max chip for its nice write and forget. always surprised to see how popular that 595 still is even though not as cost effective and mcu timing just plain nasty. worst of both worlds.

If you have "big" common anode 7-segment displays, just commit at TPIC6B595 or TPIC6C595 to each one and forget the multiplexing.

i tried those but at 10x the cost of 7219 module and 100x the work think ill pass. for me its either connect direct to port pins and suffer some cpu overhead or 7219 p-n-p pcb for a few pennies more. id even resort to 595 instead so for me TPIC6C595 is worst of 3 evils. lol

i thought the only drawback to 7219 was cathode only so those are looking even better now.

Hey, if you are using the built-in digit decoder, you are only doing boring number stuff!

haha... yes, its true. ok for freq counter and voltmeter but specially lacking was ability to do hex for debugging purpose. forced to go the direct port pin route for that. but now that im getting into custom characters for the comm anode might as well take advantage and do it for the comm cathode too.

i do like these led displays. they come in real handy for pin crippled t13 and t45 like op mentions. more useful to me than the popular hitachi lcd. easier to wire and code and cheaper than tft or oled.

Hi, I read this post with interest but one issue only briefley gets touched:

what is the difference between using a 74HC595 versus the Maxim7219?

I use an ATTiny85 with a MAX7219 to run 8x8 matrices as well as 7-seg displays of various digit counts.
Forget the shift registers that need 8 resistors per digit. There is not going to be a lower component count than with the MAX7219.

INTP:
I use an ATTiny85 with a MAX7219 to run 8x8 matrices as well as 7-seg displays of various digit counts.
Forget the shift registers that need 8 resistors per digit. There is not going to be a lower component count than with the MAX7219.

Ok, no more 74HC595 for 7-segment displays.
And what about the SAA1064 versus the MAX7219?

And also available are the TM1637 displays where -am I correct?- the display is directly driven by I2C?

SAA1064 is obsolete, only does 4 digits, and is 0.6" wide package vs 0.3" wide.
Mainly obsolete tho.

CrossRoads:
Mainly obsolete tho.

..you mean the TM1637?