Features:
- 74HC595 is a shift register using Serial IN Parallel OUT protocol
- Receives data serially and outputs through parallel pins
- Each chip provides 8 output pins
- Multiple ICs can be connected in parallel for expanded outputs
- This module includes two interconnected 74HC595 ICs
Specifications:
- Working Voltage: 3.3V–5V
- Size: 42 x 24 x 12 mm
- Display Color: Red
Connections:
Module Pin |
Arduino Pin |
VCC |
5V |
GND |
GND |
SDI |
Pin 2 |
CLK |
Pin 3 |
LOAD |
Pin 4 |
Example Arduino Code:
#include "ShiftRegister74HC595.h"
// create a global shift register object
// parameters: (data pin, clock pin, latch pin)
ShiftRegister74HC595<1> sr(2, 3, 4);
void setup() {}
void loop() {
// set all pins HIGH
sr.setAllHigh();
delay(500);
// set all pins LOW
sr.setAllLow();
delay(500);
// set pins one by one
for (int i = 0; i < 8; i++) {
sr.set(i, HIGH);
delay(250);
}
// set all pins at once
uint8_t pinValues[] = { B10101010 };
sr.setAll(pinValues);
delay(1000);
// read and set pin
uint8_t stateOfPin5 = sr.get(5);
sr.set(6, stateOfPin5);
// set without immediate update
sr.setNoUpdate(0, HIGH);
sr.setNoUpdate(1, LOW);
sr.updateRegisters();
}
Note:
Make sure to download and install the 74HC595 Library for Arduino IDE to use the above code.
Features:
- 74HC595 is a shift register using Serial IN Parallel OUT protocol
- Receives data serially and outputs through parallel pins
- Each chip provides 8 output pins
- Multiple ICs can be connected in parallel for expanded outputs
- This module includes two interconnected 74HC595 ICs
Specifications:
- Working Voltage: 3.3V–5V
- Size: 42 x 24 x 12 mm
- Display Color: Red
Connections:
Module Pin |
Arduino Pin |
VCC |
5V |
GND |
GND |
SDI |
Pin 2 |
CLK |
Pin 3 |
LOAD |
Pin 4 |
Example Arduino Code:
#include "ShiftRegister74HC595.h"
// create a global shift register object
// parameters: (data pin, clock pin, latch pin)
ShiftRegister74HC595<1> sr(2, 3, 4);
void setup() {}
void loop() {
// set all pins HIGH
sr.setAllHigh();
delay(500);
// set all pins LOW
sr.setAllLow();
delay(500);
// set pins one by one
for (int i = 0; i < 8; i++) {
sr.set(i, HIGH);
delay(250);
}
// set all pins at once
uint8_t pinValues[] = { B10101010 };
sr.setAll(pinValues);
delay(1000);
// read and set pin
uint8_t stateOfPin5 = sr.get(5);
sr.set(6, stateOfPin5);
// set without immediate update
sr.setNoUpdate(0, HIGH);
sr.setNoUpdate(1, LOW);
sr.updateRegisters();
}
Note:
Make sure to download and install the 74HC595 Library for Arduino IDE to use the above code.