Interfacing Uno/Nano with shift register SN74HC165

Hie,
I implemented the circuit and uploaded the code as shown in the mentioned link:

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

But when i tried extending the circuit to 3 or 4 shift register IC's it works only for the first 2 and dosent detect changes made on the last IC.

Can you help me with what could be the error.

Thank you.

Can you help me with what could be the error.

Could be hardware. Could be software. You've posted no schematic, and no code, so you can't reasonably expect help.

The schematic/hardware connections and code is exactly as per mentioned in the link.

"http://playground.arduino.cc/Code/ShiftRegSN74HC165N"

The schematic/hardware connections and code is exactly as per mentioned in the link.

If it WAS exactly like the playground article, you'd have EXACTLY two shift registers.

Since you have more than two, the schematic can NOT be EXACTLY like that page, and the code can NOT be EXACTLY like the code on that page, either.

So the necessary changes what i have done is:

H/W → similar connections for the 3rd IC with its pin9 connected to pin10 of 2nd IC.
Vcc,Gnd, sh/ld,clkpin,clkenable and Qh pins shorted with the other 2 ICs and one line of each of
these pins is taken and given to the arduino uno.
Initially I have connected all the datapins(3,4,5,6,1,12,13,14)of each IC to Vcc via a resistor.

S/W → in code the only change I made was made the number of shift register 3.

So, when you run the code, it does something. You seem to have forgotten to describe exactly what it does.

You expect it to do something. You seem to have forgotten to describe exactly what you expect it to do.\

If all the input pins are connected to VCC, I really don't see how you can expect a change to be detected.

Ohh forgot to mention.
I have initially connected all pins to Vcc but when uploaded and running I connect any one pin to the ground.
When I am using only 2 IC's it detects the change and shows that particulr pin as LOW.

But when I am extending the circuit to 3 IC's it detects change for the 1st and 2nd IC but not the last IC from from the connections are made to the arduino.