The 74HC595 8 bit shift register

DrLuke, a user at bildr, has written an in depth tutorial on the use of the 74HC595 8 bit shift register.

OK, so say you have this crazy cool idea where you need to control a ton of LEDs (I know, I know… LEDs). You looked at the multiplexer article, and that was great, but this idea is so cool, you need individual control of each LED, and turning them on one at a time just won’t do. Well again, we are here to help, and now it’s time to introduce you to the Shift Register. Not just any shift register, the super cheap, incredibly awesome 74HC595 8-bit Shift Register!

With a video, diagrams, even AVR and Arduino code samples!

Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here:

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in!

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 36,000+ makers on Adafruit’s Discord channels and be part of the community!

CircuitPython – The easiest way to program microcontrollers –

Maker Business — “Packaging” chips in the US

Wearables — Enclosures help fight body humidity in costumes

Electronics — Transformers: More than meets the eye!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Silicon Labs introduces CircuitPython support, and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

Adafruit IoT Monthly — Guardian Robot, Weather-wise Umbrella Stand, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — #NewProds 7/19/23 Feat. Adafruit Matrix Portal S3 CircuitPython Powered Internet Display!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at !


  1. Is there a reason he bit-bangs this instead of using the SPI peripheral?

  2. I very much LOVE to see my article here!
    Thank you very much 🙂

  3. Likely because he is doing a demonstration on the 8 bit shift register, and not SPI peripheral…. Sometimes when you incorporate elegance into something you’re trying to effectively teach, it clouds the ultimate objective.

  4. A very well-done tutorial! I wouldn’t mind seeing a matching tutorial for the ‘595’s “partner” – the 74HC165 (8-bit P>S shift register) for those who need byte-wide inputs.

  5. Who could have guessed that something as apparently boring as an 8 bit shift register could become something of wonder.

  6. One thing that may become an issue: according to my Philips datasheet, max ICC=+-75mA. As documented, the 180 ohm resistors to drive each LED will permit about 10mA (3V LED) to 15mA (2V LED) or so. If you drive all 8 at once, that’s 80mA to 120mA total current which is out-of-spec. Clearly this will work fine if you don’t drive all 8 LED’s, but that’s an unusual limitation.

  7. At my tech college in the early 90’s we spent a lesson going through a heap of linear and digital ICs. We were shown a diagram of the internal circuitry on an overhead projector and hit with a few details from the datasheet.

    Q. How and when would I use that?
    A. We’ll get to that in the lab.

    Two weeks later in the lab. “Don’t touch anything! These CRO’s are worth more than your life.”

    So yeah I wish I had access to tutorials like this back in the 90’s. It doesn’t matter if there end up being hundreds of tutorials on shift registers. Someone will find this one and it will be the ‘one’ that makes sense to them.

    Nice one, DrLuke. ! Keep up the good work, internet.

  8. Thanks Adam!

    It’s really encouraging to see people liking my work 🙂

  9. Hi, im trying to do a project using these shift registers, i looked this tutorial and its great, but i have a problem: in my project i use PIC16F887, and this code is for andruino o AVR. So i wonder if someone could help me to understand the code for PIC.

Sorry, the comment form is closed at this time.