Project tutorial
3 Pins, 32 LEDs, 4 Shift Registers [74HC595]

3 Pins, 32 LEDs, 4 Shift Registers [74HC595] © LGPL

An arduiNOOB friendly tutorial for beginners on daisy-chaining.

  • 4,732 views
  • 15 comments
  • 11 respects

Components and supplies

Apps and online services

About this project

This is a step-by-step guide that I have created for beginners and arduiNOOBS like me.

In this tutorial, we would be discussing some pretty basic knowledge about the 8-bit shift register called 74HC595.

Learn how to daisy-chain them together and use some codes from an HC595 Library.

Also, I encountered a problem with some of the shift registers. I don't know why. Was it because of lack of power?

******************************************************************************

NECESSARY LINKS:

HC595 Library - https://github.com/j-bellavance/HC595

Datasheet - http://www.ti.com/document-viewer/SN74HC595/datasheet/specifications#SCLS0419845

More Information: https://rastating.github.io/using-a-74hc595-shift-register-with-an-arduino-uno/

For Loop Iteration: https://www.arduino.cc/en/Tutorial/ForLoopIteration

******************************************************************************

Social Media Links To Follow (I mean, if you want to):

Facebook - https://fb.me/HeathenHacks

Twitter - https://twitter.com/HeathenHacks

Instagram - https://instagr.am/HeathenHacks

******************************************************************************

Video Is Up!

CLICK HERE FOR THE BONUS LIGHT SHOW VIDEO! EDITED THE VIDEO IN PREMIERE, BECAUSE IT LOOKS PRETTY.

Code

Edited Sample Code From The HC595 Library.Arduino
#include <HC595.h>

const int chipCount = 2;  // Number of serialy connected 74HC595 (8 maximum)
const int latchPin = 4;  // Pin ST_CP (12) of the 74HC595
const int clockPin = 3;  // Pin SH_CP (11) of the 74HC595
const int dataPin = 2;   // Pin DS (14) of the 74HC595

//Constructor
HC595 ledArray(chipCount,latchPin,clockPin,dataPin);

int delayMs = 30;
int lastPin = ledArray.lastPin();

void setup() {
  ledArray.reset();
}

void loop() {
  for (int i = 0 ; i <= lastPin ; i++) {
    ledArray.setPin(i, ON);
    delay(delayMs);
  }
  for (int i = lastPin ; i >= 0 ; i--) {
    ledArray.setPin(i, OFF);
    delay(delayMs);
  }
  for (int i = lastPin ; i >= 0 ; i--) {
    ledArray.setPin(i, TOGGLE);
    delay(delayMs);
  }
  for (int i = 0 ; i <= lastPin ; i++) {
    ledArray.setPin(i, TOGGLE);
    delay(delayMs);
  }
}
HC595 Library by Mr. J. Bellavance

Schematics

Daisy-chained. Schematic.
74hc595 pbbjjvxxwm

Comments

Similar projects you might like

Control 8 x 8 LED Matrix with Only Two Shift Registers

Project showcase by Jegqamas

  • 2,160 views
  • 1 comment
  • 10 respects

Sound Sensor Activated LEDs with LCD for Sound Level Data!

Project tutorial by HeathenHacks

  • 2,795 views
  • 4 comments
  • 14 respects

Digital Clock with Arduino, RTC and Shift Register 74HC595

Project in progress by LAGSILVA

  • 24,580 views
  • 21 comments
  • 58 respects

Night Light Assistant

Project showcase by Gabriele Fugazzi

  • 3,828 views
  • 9 comments
  • 21 respects

Create Mobile Apps for Android and iOS Connecting to the MKR

Project tutorial by Chandana Pathirage

  • 6,205 views
  • 4 comments
  • 16 respects
Add projectSign up / Login