Of course 74HC595 can do more than just controlling dumb LEDs but LEDs is what commonly used to give example of how 74HC595 works and LEDs are used in decoration. Arduino shift register 74HC595 library makes prototyping with LED easy & fast. Furthermore, the user can add more features or examples to the library or it’s fork to make it more useful to the new Arduino users. For this guide, the readers need to read two previous articles – How To Connect 74HC595 Shift Register With Arduino and 74HC595 Shift Register Theory. For getting used with library development, one needs to read How to Write Arduino Library of Your Own.
Shift Register 74HC595 Library
Here is the GitHub repository of the library. You’ll get required documentation, example on the developer’s site :
1 2 | https://shiftregister.simsso.de/ https://shiftregister.simsso.de/code-example.html |
The biggest advantage of the library is in using multiple shift registers. Just with few lines of code, it is possible to “blink” all the LEDs :
---
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <ShiftRegister74HC595.h> // create a global shift register object // parameters: (number of shift registers, data pin, clock pin, latch pin) ShiftRegister74HC595 sr (1, 0, 1, 2); void setup() { } void loop() { // setting all pins at the same time to either HIGH or LOW sr.setAllHigh(); // set all pins HIGH delay(500); sr.setAllLow(); // set all pins LOW delay(500); } |
It is possible to declare multiple shift registers parallel :
1 2 3 4 5 6 7 | ... int numberOfShiftRegisters = 1; // number of shift registers attached in series int serialDataPin = 0; // DS int clockPin = 1; // SHCP int latchPin = 2; // STCP ShiftRegister74HC595 sr (numberOfShiftRegisters, serialDataPin, clockPin, latchPin); ... |
However, using multiple shift registers in series of course just a matter of electrical connection :

We used the illustration created by the developer. As for further development of the libaray, there are two files :
1 2 | https://github.com/Simsso/ShiftRegister74HC595/blob/master/src/ShiftRegister74HC595.h https://github.com/Simsso/ShiftRegister74HC595/blob/master/src/ShiftRegister74HC595.cpp |
Understanding the logical flow and modification will help to develop. This is a handy library for various fancy prototyping works with 74HC595.
Tagged With 74hc595 arduino library , arduino shift register library , 74hc595 , 74hc595 arduino com схема , arduino shift register , arduino read write data shift register , led circuit diagram using ic 74hc595 , 74hc595 library , arduino 74hc595 library , 74hc595 схема включения