Problem with 74HC165 array

Hi, I was trying to demultiplex some switches using code here

https://playground.arduino.cc/Code/ShiftRegSN74HC165N

I started with a single chip and it worked well, but when I added a 2nd one I was unable to detect the changes on the switches connected there (the other one still worked properly)

Double checking I noticed I used a different schematic for the circuit, not the one at arduino, there clock and clock enable were connected in parallel to the same arduino pin and that is how I made the circuit.

My question is, can this be causing I am unable to read the 2nd chip?

I know it may be a dumb question but I don't know how this shift register works internally, I just understand it converts parallel to serial.

Thanks in advance.

Jay98:
Double checking I noticed I used a different schematic for the circuit, not the one at arduino, there clock and clock enable were connected in parallel to the same arduino pin and that is how I made the circuit.

It's a little unclear what you mean. Each S.R. clock needs to connect to whichever Arduino pin is designated for clocking and each of the enables needs to connect to the designated enable pin to realize a 16-bit shift register. Oh, and you also have to connect the output of 'A' to the input of 'B' and the output of 'B' to the Arduino.

Jay98:
I know it may be a dumb question but I don't know how this shift register works internally, I just understand it converts parallel to serial.

Have you looked at a datasheet?

aarg:
Have you looked at a datasheet?

yes and I don't get what it says besides the fact it convert parallel to serial signal
I am not electronic, just trying to build some kind of control for a pc game

dougp:
It's a little unclear what you mean. Each S.R. clock needs to connect to whichever Arduino pin is designated for clocking and each of the enables needs to connect to the designated enable pin to realize a 16-bit shift register. Oh, and you also have to connect the output of 'A' to the input of 'B' and the output of 'B' to the Arduino.

I mean in the schematic I used both clock pins (2 and 15) were jumped and connected to a single arduino input

Can you put up an as-built schematic of *your * circuit? The internals of the shift registers aren't important as long as it's something with the pin numbers, like the Functional diagram, Figure 1. on this datasheet.

it is the one in the link I posted, except as I mentioned pin 2 and 15 are jumped together and I am using pull up resistors instead to pull down

If your circuit is exactly like the one pictured it’ll never work - Vcc is not connected to either chip.

It does not make sense (to me) to connect CLK and CLKINH together.

Looking at table 6.11 in the Texas Instruments datasheet, CLKINH must be set before you change the clock. If you wire both together, that will not be the case.

I think you're just lucky that it worked with one.

Hi,
Can you please post your code?

Thanks.. Tom.. :slight_smile:

TomGeorge:
Hi,
Can you please post your code?

Thanks.. Tom.. :slight_smile:

Sure! It is the one posted in the example
https://playground.arduino.cc/Code/ShiftRegSN74HC165N
With both clock and clock enable using the same arduino pin

sterretje:
It does not make sense (to me) to connect CLK and CLKINH together.

Looking at table 6.11 in the Texas Instruments datasheet, CLKINH must be set before you change the clock. If you wire both together, that will not be the case.

I think you're just lucky that it worked with one.

Ok ty, it must be that then, somehow 3 of the 8 buttons in the 2nd chip started working, but others still don't
I will fix that thing..

Jay98:
Sure! It is the one posted in the example
Arduino Playground - ShiftRegSN74HC165N
With both clock and clock enable using the same arduino pin

Sorry I said please.
It needs to be posted her so everybody can view it, the fact that it is on another site, and the different platforms this forum is viewed on, means it will be easier to view it through the forums scrolled format.

The code that you have, even though it is the same as the example.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

Problem was caused by a faulty soldering, I hate myself for all the time that took me to realize that.