0
\$\begingroup\$

I connected the 74HC165 as per this schematic http://dlnmh9ip6v2uc.cloudfront.net/datasheets/BreakoutBoards/SN74HC165%20Shift-In%20Breakout-v11.pdf and then used this code http://playground.arduino.cc/Code/ShiftRegSN74HC165N with NUMBER_OF_SHIFT_CHIPS set to 1. I get all the weird outputs like:

*Pin value change detected*
Pin States:
  Pin-0: LOW
  Pin-1: LOW
  Pin-2: LOW
  Pin-3: LOW
  Pin-4: LOW
  Pin-5: LOW
  Pin-6: LOW
  Pin-7: LOW

*Pin value change detected*
Pin States:
  Pin-0: HIGH
  Pin-1: HIGH
  Pin-2: HIGH
  Pin-3: HIGH
  Pin-4: HIGH
  Pin-5: HIGH
  Pin-6: HIGH
  Pin-7: HIGH

*Pin value change detected*
Pin States:
  Pin-0: LOW
  Pin-1: LOW
  Pin-2: HIGH
  Pin-3: LOW
  Pin-4: HIGH
  Pin-5: HIGH
  Pin-6: HIGH
  Pin-7: HIGH

*Pin value change detected*
Pin States:
  Pin-0: HIGH
  Pin-1: HIGH
  Pin-2: HIGH
  Pin-3: HIGH
  Pin-4: HIGH
  Pin-5: HIGH
  Pin-6: HIGH
  Pin-7: HIGH

*Pin value change detected*
Pin States:
  Pin-0: HIGH
  Pin-1: LOW
  Pin-2: LOW
  Pin-3: LOW
  Pin-4: LOW
  Pin-5: LOW
  Pin-6: LOW
  Pin-7: LOW

*Pin value change detected*
Pin States:
  Pin-0: LOW
  Pin-1: LOW
  Pin-2: LOW
  Pin-3: LOW
  Pin-4: LOW
  Pin-5: LOW
  Pin-6: LOW
  Pin-7: LOW

I have nothing connected to the input pins of the 165. The worst part is, I get the same output even if nothing is connected to the board... :( however the board seems to be okay with other programs, it's a leonardo compatible board.

\$\endgroup\$
  • \$\begingroup\$ I would post this on the Arduino forum where you got that code. Probably in "LEDs and Multiplexing". Just like people here, they will want to know what is hooked to what. For example, I'm not sure I know what JP1 is in the schematic you linked to. Other people might need more explanation as well. \$\endgroup\$ – mikeY Nov 19 '13 at 18:43
  • \$\begingroup\$ @mikeY JP1 is nothing but the jumpers on the breakout board as in, sparkfun.com/products/11512 \$\endgroup\$ – whizzzkid Nov 20 '13 at 2:58
3
\$\begingroup\$

Most likely the problem is caused by not having anything connected to the input pins of the 74HC165. I did not look at the circuit closely, however, if you don't put something predictable on the input pins of any device, all kinds of strange things can happen. All you have to do is pull up or pull down the input pins with a 10 k resistor and then the results will be predictable. Good luck.

\$\endgroup\$
  • \$\begingroup\$ connecting the input pins to 10k resistor to ground worked like charm. Also adding the 0.1uf capacitor helped (it was hard to get, as shops here only sell minimum 1k pieces) anyhow the things is working great. Also with daisy chains. But was just wondering if I could reduce the number of resistors. I am having 16 resistors for 16 pins as of now. any idea? \$\endgroup\$ – whizzzkid Nov 25 '13 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.