Close

Shift Work

A project log for Common Anode LED Control

How to hook up a 7-segment common anode display to Arduino

MarkMark 05/29/2016 at 17:160 Comments

By using a 74HC595 Cascading Shift Register to toggle the ULN2803 inputs it's possible to (un)set any number of display segments by writing a single byte to the data port. This would reduce, simplify and speed up the code needed to control the display. Back to the breadboard!

The 595's outputs Q0 to Q6 are hooked up to input 1B to 7B. The clock, latch and data pins are wired to my Nano. I'm using pin D10 to D12 but other digital pins would work as well. Note that i'm using an external 5V power supply to power the circuit and that the Nano, which uses USB power, is wired to common ground. The Nano onboard 5V supply would probably manage to power a single digit but I'm not taking any chances and want to be able to add more digits in the future. Adding digits is simply a matter of adding a Darlington driver and cascading a second shift register by hooking up its DS serial input to the Q7" serial out pin of the first 595.

Now all that's left to do is to write the code that will make it all happen.

Discussions