I am relatively familiar with shift registers and how they operate at a conceptual level but I am stuck on this one and need some more experienced help.
I am running a microcontroller that requires an 8 bit word input but I only have 4 digital i/o pins to work with. I decided on an 8 bit parallel in/serial out shift register, a TI SN74HC165. I have one of the D i/o pins running the parallel load, one clocking the register, and one reading the serial output after each clock. Each of the 8 parallel inputs will be either +3.3V or grounded. No hanging 1's, they goes straight to V+. Low's short straight to ground. If you look up the data sheet for the HC165 there is also a Clock Inhibit that I always have shorted to ground. Serial In on the HC165 is nc.
The problem I have is I can never get the proper output. Sometimes the serial output is always high, sometimes it is always low, and occasionally it is random. I have gotten the proper output twice but given how many tests I've run on the basic circuit, those can be assumed to have been random as well. Testing was done using a simple triple 5 monostable circuit for clocking.
The way I have everything connected is the same as it appears here:
http://blog.aztronics.com/wp-content/uploads/2011/03/Keypad_74HC165.gif
Thanks in advance for any help!
I am running a microcontroller that requires an 8 bit word input but I only have 4 digital i/o pins to work with. I decided on an 8 bit parallel in/serial out shift register, a TI SN74HC165. I have one of the D i/o pins running the parallel load, one clocking the register, and one reading the serial output after each clock. Each of the 8 parallel inputs will be either +3.3V or grounded. No hanging 1's, they goes straight to V+. Low's short straight to ground. If you look up the data sheet for the HC165 there is also a Clock Inhibit that I always have shorted to ground. Serial In on the HC165 is nc.
The problem I have is I can never get the proper output. Sometimes the serial output is always high, sometimes it is always low, and occasionally it is random. I have gotten the proper output twice but given how many tests I've run on the basic circuit, those can be assumed to have been random as well. Testing was done using a simple triple 5 monostable circuit for clocking.
The way I have everything connected is the same as it appears here:
http://blog.aztronics.com/wp-content/uploads/2011/03/Keypad_74HC165.gif
Thanks in advance for any help!