Btw - the 74hc165 shiftregister circuits i know from earlier electronic experiments, had a slightly different layout. There should be a 10k pullup between the SER pin and +5V of each shiftregister And a 100nF capacitor between Vdd and Gnd as close to the chips pins as possible. http://www.ucapps.de/mbhp/mbhp_dinx4.pdf