# How to connect multidigit 7seg common anode/cathode display to cascading shift register?

How can I connect this type of 7 segment display to cascading register like 74HC595? I know I can use 7219, but at the moment I have those cheap registers and would like to see if it's possible.

Not looking for MCU scanning solution!

The problem for me is that segments are interconnected... What is the simple way to connect?

UPDATE:

I've found the following in google. Is it close to what I am trying to achieve? There is only 1 shift register instead of 4 though.

UPDATE 3:

-
The update works as the ATTiny provides the data to the register. It will need to continuously send the data to the register though, on each clock pulse tied into OH. And due to the way the register works, you need to pulse OH as the counter CLK latches on the low-to-high transition. So send Digit1+OH Low, Digit2+OH High, Digit2+OH Low, D3+OH High, D3+OH low, D4+OH High, D4+OH Low, D1+OH High, repeat. You also need to set up the attiny to receive data from your main arduino, as a i2c/spi/serial data slave. –  Passerby Jan 10 '13 at 22:45
@Passerby: so this is not completely what I want, it will be again scanning by main MCU or using different MCU for scanning. I need to keep the data in 4 respective registers, then push it to LED one at a time. But how... –  Pablo Jan 10 '13 at 22:47
That's the thing. The scanning has to be done, but it can be done by your main Arduino, a dedicated attiny + 1 register + counter, or 4 registers + 555 timer + Decade Counter. Or 4 registers + attiny acting as the 555/decade counter combination. Or a dedicated Driver IC. When I said that the data has to be sent over and over again with 1 register, that means the attiny handles all of that. The main arduino only sends out the data once until it needs to change. –  Passerby Jan 10 '13 at 22:54
@Passerby: Let's stop by 4 registers + 555 timer + Decade Counter please. It's ideal for me if I can only know how to make the scanning part and understand connections. –  Pablo Jan 10 '13 at 23:01
In that case, you just need to combine the three schematics. Shift registers to arduino and leds as in the 1st schematic. Output of decade counter to transistors as the 2nd schematic AND to the OE pins (these will need inverting). 555 as shown in the schematic I posted. If you need help I can try making a schematic in a few hours. –  Passerby Jan 10 '13 at 23:08

It can be done with the 74HC595, but you will need an extra chip or ic. You will need to drive both the common anode for each display, and the OE (OUTPUT ENABLE) pin on each shift register at a separate time. The OE pin allows you to disconnect the output pins without clearing the shift register. Creative use of this allows pwm, or in this case, by cycling through through a digit/shift register pair, allows you to implement scanning.

The easiest way to do this would be a 555 timer driving a decade counter (or ring counter). The 555 would provide a clock signal, while the decade counter loops through the four shift register OE pins.

Can't be done without scanning. Especially not with a simple shift register. Not without cutting open the display and somehow wiring individual cathodes for each digit. Those multidigit displays are designed for scanning in order to save on pins. It sacrifices software efficiency for hardware resource reduction.

What you need is a LED Display Driver ic, like the MAX6965 LED Driver with PWM Intensity Control (I2C) or ICM7211, ICM7212 Four Digit Display Decoder/Drivers (Shift Register like) (Of course, check datasheets first before you buy. You need a common-anode driver)

Siemens provides a detailed appnote on how to interface to 7segment displays Drivers For Light Emitting Displays Appnote 24 including a list of drivers suited for this.

The other option is to take a second microcontroller like a attiny and make your own driver, implementing it's own scanning so the main arduino doesn't need to do it.

Inverting Transistor setup. Uses a weak pull-up to disable OE pin when the base has no current, pulls to ground when the base has a current.

-
How about using some logic IC (not sure about name), which will shift 1 to the next pin each input clock? Then I can use 555 timer to scan digits. –  Pablo Jan 10 '13 at 21:36
@Pablo actually, I'm updating my answer. Give me 2 minutes. –  Passerby Jan 10 '13 at 21:52
sure. just hope you understand what logic IC I mean. It's just shifting 1 bit through pins. I had that in my childhood :) –  Pablo Jan 10 '13 at 21:53
I feel like that has to be a way we can do this with a few buffers and a 555 timer. Or you could buy a display that matches! –  Kortuk Jan 10 '13 at 22:02
@Kortuk: I really can't find the display that matches in the local market. Either anodes or cathodes are common. Ordering one from abroad imposes some difficulties. Looking forward to find solution with simple components like 555. I mean if it get's too complex of course I would consider other ways, but hope someone can suggest simple circuit. –  Pablo Jan 10 '13 at 22:05

They are assuming you would only have one of the 7-segments sections powered at once. You will need to sequence through powering the 3 sections fast enough they all appear to be on at once.

Your circuit for shifting appears good.

-
I can't use scanning, it's really resource hog for tiny and busy MCU and requires additional pins. I specifically mentioned cascading so I can set once and forget. –  Pablo Jan 10 '13 at 21:17

I've written a tutorial on the theory behind cascading the 74HC595 for a clock. I am not entirely clear how you are driving the 7-seg displays, but it should be helpful in explaining how to get a desired output from the chip. From this you can wire it appropriately to your driving mechanism.

:edit: Looking at your circuit, since you are required to multiplex, perhaps you can use 3 more bits on the registers to drive the anode of each digit. Seems like you could just use two registers cascaded, one for the eight cathodes and one for 3 anodes.

-
With 1 register on segments it's impossible to save data for 3-4 digits. –  Pablo Jan 11 '13 at 9:13
I see. So then you would need to use the OE pin on each registers if you want to have the numbers being saved. It looks like Passerby has that all covered... –  Mike Jan 11 '13 at 14:50

May I point out that if there is a common anode/cathode for each digit and all segments have the same pins like almost every multi-digit display, there is no way to avoid scanning. If each digit is separate digit and has its own set of segments and the segments are not tied together, then you could use a shift register for each digit and cascade them without scanning as you want.

A long time ago I remember a special BCD encoded LED display that you sent it the actual BCD of the digit and it took care of the rest. But I could not tell you if they are even still manufactured or even if they have multi-digit versions.

I think your best bet is either have an ATTiny receive the data and take care of the display with either single digit/shift registers pair per digit (no scanning) or just use 2 shift registers with the multi-digit display (scanning which you cannot avoid).

-