Cascaded shift registers, 7-seg displays, PC input

Hi folks,

I've uploaded another long how-to blog post. This time I've cascaded four 74HC595 shift registers to drive 4 7-segment displays from only 3 Arduino lines. I also added code to take the number to display from serial port input.

My blog post has instructions, a full schematic of the circuit, some photos, and a YouTube video link. Check it out here.

Hopefully someone finds this interesting/useful - hard to tell with no feedback.

hey thanks for sharing, I find your stuff to be a pretty good challenge! :D

is this suitable for your project?

I really like your idea.

I'm building a weather station using arduino.

The main display of all the weather data is to be my PC. The PC is on only for short periods so for most of the time the arduino will just be a box with blinking lights.

I did not have many digital pins left but with your circuit I think I will add some hex display to make it more entertaining.

I may write it as a small class as I did for the sd card:

I assume your idea is competely open as mine are but I will Include your site in the comments if you wont. Or not if you dont.

I will post the details on this forum.

That seems an awful lot of work and extra code for something that can be done with a 4094 shift register (or similar) and a couple of decoder ic's...

@nouse4anick No - this is called showing people how to do it the easy way first - building blocks - then going to more advanced stuff with only a couple of shift registers and a bunch of 3-8 line decoders to cut down on component count and increase effective fanout. No point showing people how to run before walking. But thanks for your comment.

I wouldn't really call it 'doing it the easy way'... more of a brute force method of doing it.

The next project you might want to consider using 4094's and some bcd to 7 seg decoders, it makes for much cleaner code (i posted an example a while ago).

But for four digits, and keeping the Arduino pin-use count to 3, wouldn't that need 2 4094s and 4 decoders? 6 chips rather than my 4?

I don't really get your argument - my way does a bit of extra coding rather than using 1 or 2 extra chips - seems like even-stevens to me.

And why a 4094 - just the same as a 595, but CMOS.

@Carl - yes, please use whatever you like.

Thanks paul.

There are many ways to skin a cat.

But for each 7 seg display you need a driver. Then why not use the 74HC595 and also get the shift register.

If you use BCD to 7 segment drivers you are limiting yourself to 0 to F. With your method we have full use of the 7-seg display.

It seems obvious to me!

As soon as I get my sensors of the protoboard I will be trying out your idea.

The other thing I like is that without using the 8th output on each shift register (if I don't care about the decimal points on the 7-segs), I've now got an extra output per 595 to use for something else if I want.


while you would have to use a couple extra chips, you remove a LOT of code and overhead to any project by reducing the amount of work for each iteration of the program.

for example: your method requires extra memory to map the outputs correctly, if you use BCD then you don't really require any extra arrays or complicated if statements (my algorithm for 2 digits was only a dozen lines or so).

I'm not just building these circuits to just drive 7-seg displays. My blog series is building up the knowledge, code, and circuitry to be able to drive arrays of 8x8 LED matrices and into double-digit-n nxnxn LED cubes. This blog post was about how to daisy-chain shift registers, not about the most compact, code-tight way to drive 2 x 7-seg displays.

I completely understand what you're saying - but for pure 7-seg display driving, you're doing it a different way from me - extra h/w vs. extra code. There's no saying one way is better than the other - the solutions have different characteristics.

So there's no point arguing about it.


I have completed a 4 digit display for my weather station.


So i'm in this design project class where were using the arduino to take in MIDI input (wait for it, there's a point that's relevant to this post) from a MIDI piano, and use it to signal solenoids that will play something. The trouble is, its hard to tell what bytes are being placed inside the arduino's serial buffer for debugging purposes, but I figured from what I read here that with three 2 digit 7-segment displays, and a bunch of shift registers, i can make a midi serial analyzer of sorts, right? Thanks.