Table of Contents

lamaPLC: CJMCU-164; SN74HC164D 8-bit Shift Register Module

CJMCU-164; SN74HC164D 8-bit Shift Register Module The CJMCU164 8-bit shift register board is based on the SN74HC164D IC. The SN74HC164D is an 8-bit serial-in parallel-out shift register.

SN74HC164D

These 8-bit shift registers have AND-gated serial inputs and an asynchronous clear (CLR). The serial inputs (A and B) can be controlled completely; a low level at either input prevents new data from entering and resets the first flip-flop to low at the next clock pulse (CLK). When an input is high, it allows the other to control the first flip-flop's state. Data at the serial inputs can be altered while CLK is high or low, provided the minimum setup time is met. Clocking happens on the low-to-high transition of CLK.

If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.

Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.

2026/02/14 23:38

Technical data

CJMCU-164 Pinout

CJMCU-164; SN74HC164D 8-bit Shift Register Module

Pin NameTypeDescription
VCCPowerSupply voltage (2V to 6V)
GNDPowerGround
DSA (A)InputSerial Data Input A. AND-gated with DSB
DSB (B)InputSerial Data Input B. AND-gated with DSA
CP / CLKInputClock Input. Shifts data on the low-to-high transition
MR / CLRInputMaster Reset (Active LOW). Clears all outputs to LOW regardless of other inputs
Q0 – Q7Output8-bit Parallel Data Outputs

Pin Functions & Usage

Arduino example code

Arduino Pinout

CJMCU-164 PinArduino PinDescription
VCC5VPower Supply (2V to 6V)
GNDGNDGround
DSA / DSBPin 2Data Input (Connect one or both together)
CP (Clock)Pin 3Clock Input (Shifts on Low-to-High transition)
MR (Reset)5VMaster Reset (Keep HIGH for normal operation)

Example Code

This code uses the built-in shiftOut() function to send an 8-bit pattern to the register, which will light up LEDs or drive other parallel components.

// Define pins connected to the CJMCU-164
#define DATA_PIN 2  // Connected to DSA/DSB
#define CLOCK_PIN 3 // Connected to CP
 
void setup() {
  // Set pins as outputs
  pinMode(DATA_PIN, OUTPUT);
  pinMode(CLOCK_PIN, OUTPUT);
}
 
void loop() {
  // Example 1: Send a binary pattern (B10101010)
  // This will turn on every other output pin (Q0-Q7)
  shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 0b10101010);
  delay(1000);
 
  // Example 2: "Walking" bit (Light one LED at a time)
  for (int i = 0; i < 8; i++) {
    byte pattern = (1 << i); 
    shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, pattern);
    delay(200);
  }
}

Key Technical Details

Source

https://docs.arduino.cc/tutorials/communication/guide-to-shift-out/

Communication topics on lamaPLC

PageDateTags
2026/04/23 21:51, , , , , , , , , , , , , , , , , , , , , , ,
2026/04/23 21:51, , , , , , ,
2026/04/23 21:51, , , , , , , ,
2026/04/23 21:51, , , , , , , , , , , , ,
2026/04/23 21:51, , , , , , , ,
2026/04/23 21:51, , , , , , , , , , , , , ,
2024/11/16 21:08, , , , , , , , , , , , , ,
2026/04/23 21:51, , , , , , , , ,
2024/11/16 20:43, , , , , , , , , , , , , ,
2024/11/16 01:16, , , , , ,
2026/04/23 21:51, , , , , , , , , , , , ,
2024/11/15 21:15, , , , , , , , , , ,
2026/04/23 21:51, , , , , , , , ,
2024/11/16 01:46, , , , ,
2026/04/23 21:51, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2025/09/23 21:25, , , , , ,
2026/04/23 21:51, , , , , , , , , , ,
2026/04/23 21:51, , , , , , , , , , , ,
2026/04/23 21:51, , , , , , , , ,
2024/11/15 21:28, , , , , , , , , , , , , ,
2026/04/23 21:51, , , , , , ,
2024/11/16 02:26, , , , , , ,
2024/11/15 21:33, , , , , , , , , , , , , , ,
2026/04/23 21:51, , , , , , , ,
2026/04/23 21:51, , , , , , , , ,
2026/04/23 21:51, , , , , , , , , , , , , , , , , ,
2026/04/23 21:51, , , ,
2026/04/23 21:51, , , ,
2026/04/23 21:51, , , , ,
2026/04/23 21:51, , , ,
2026/04/23 21:51, , , , , , , , , ,
2026/04/23 21:51, , , , , , , ,
2025/11/20 22:49, , , , , , , , , , , , , , , , , , , , ,
2024/11/15 23:07, , , , , , , , , , ,
2026/04/23 21:51, , , , ,
2026/04/23 21:51, , , , , , , , , , ,
2026/04/23 21:51, , , , ,
2026/04/23 21:51, , , , , , , , , , , , ,
2024/11/16 00:36, , , , , , , , , , , , , , ,
2026/04/23 21:51, , , , ,
2026/04/23 21:51, , , , , , , , , , , , , , , , , , , , , , ,
2026/03/22 03:14, , , , , , ,
2026/04/23 21:51, , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , ,
2026/03/28 23:50, , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , ,
2026/03/06 01:19, , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/04/23 21:52, , , , , ,
2026/04/23 21:51, , , ,
2025/05/31 23:32, , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , ,
2025/11/22 00:07, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2023/07/01 17:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/04/11 18:28, , , , , , , , , , ,
2026/04/11 19:54, , , , , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:51, , , , , , , , , , , , , , ,
2026/02/14 18:27, , , , , , , , , ,
2026/04/23 21:52, , , , ,
2026/04/23 21:52, , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/04/23 21:51, , , , , , , , ,
2026/02/14 18:42, , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/04/23 21:52, , , , , , , , , ,
2023/06/19 23:24, , , , , , , , , , , , ,
2026/04/15 19:41, , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , ,
2026/02/14 23:51, , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , ,
2026/04/23 21:51, , , , , , ,
2023/06/25 00:43, , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/03/07 01:46, , , , , , , , , , ,
2024/08/18 16:52, , , , , , ,
2026/02/15 00:00, , , , , , , , ,
2026/03/05 21:19, , , , , , , , , , , , , , , , ,
2026/02/14 18:49, , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , ,
2026/04/23 21:52, , , , , , ,




This page has been accessed for: Today: 2, Until now: 11