64 Pin Cable Checker

Hi,

I'm trying to make a 64 pin cable checker wired 1:1. Attached is the basic schematic for 32 pins (I will double it for 64 later once the software proves out.

The idea is, the 74HC565 (parallel to serial shift register) will output one bit at a time. The 74HC165 (parallel to serial shift register) will then receive the bit (via the cable under test). The schematic is showing LED's as i'm using these for indication at the moment. The 74HC165 is sending all the bits to the serial monitor fine using the example code (InfectedBytes | Arduino ShiftIn) below. I need help with reading the entire 64 bit serial data and doing comparisons on it to make sure the bits are as expected. I can only view the string of bits in the serial monitor and see them change when I physically press a button on the breadboard.

Any help is most appreciated as I've only done basic coding before!

#include <ShiftIn.h>
// Init ShiftIn instance with one chip.
// The number in brackets defines the number of daisy-chained 74HC165 chips
// So if you are using two chips, you would write: ShiftIn<2> shift;
ShiftIn<2> shift;

void setup() {
  Serial.begin(9600);
  // declare pins: pLoadPin, clockEnablePin, dataPin, clockPin
  shift.begin(8, 9, 11, 12);
}

void displayValues() {
  for(int i = 0; i < shift.getDataWidth(); i++)
    Serial.print( shift.state(i) ); // get state of button i
  Serial.println();
  
}

void loop() {
  if(shift.update()) // read in all values. returns true if any button has changed
    displayValues();
  delay(1);

}

SCHEMATIC1 _ PAGE1.pdf (29.9 KB)

I'm not sure what the question is.

I would use MCP23017 IO port-expander chips. The coding would be more simple and you would have the ability to check for continuity as well as shorts.

Why did you start a new post for this?

https://forum.arduino.cc/index.php?topic=716624.msg4814284#msg4814284

This one is locked.