Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

problems with 74HC165 PISO Shift Register

Status
Not open for further replies.

King_bob

New Member
Hi,
I am having issues reading the data out of a 74HC165 shift register. Initially I had it hooked up to an attiny85, but I couldnt seem to get the correct reading, so I broke it down to the most basic possible schematic. I am completly a newb at electronics so dont hurt me too much ;D

(resistors in image are 10k not 220)
74HC165_ManualTest_bb.jpg


The output (Q7) on which the led is connected flickers randomly, when I dont press anything. also pressing the PL and CL as follows:
PL:HIGH
PL:LOW
PL:HIGH
LED should show DIP 1
CL:HIGH
CL:LOW
LED should show DIP 2

does not deliver the expected results, but allways delivers random results each time.

Any ideas on where the problem ist?
 
You'll need some pull-downs / de-bouncing on your clock and load lines (pins 1 & 2). This is a high-speed CMOS device - you can't just leave the pins floating. Leaving them floating can lead to strange / unpredictable behavior.
 
Ok, thanks, I aded a pulldown to pins 1&2, and that solved the flickering issue, but unfortunately the data still returns random any suggestions there?
 
Is the blue "wire" which seems to connect from pins 3, 4, 5, 6, 11, 12, 13 & 14 of the IC to the "top" of the DIP switch a single wire or a "bus" of eight individual wires? It needs to be the latter, ie. each switch connects to a separate IC input pin.
 
OK. It's not easy to tell that from the diagram. After looking more at the 'HC165 datasheet, your connections to pin 1 may have something do do with the problems. It should be held high to allow the data to shift out with clock pulses and momentarily go low to load the dip switch value into the chip. So... I would try this: change the pull-down on pin 1 to a pull-up. Change the wire on the load switch to connect to gnd instead of +5v when it is pressed. The wiring of the clock switch can stay as it is currently with a pull-down, although you may have to add some de-bouncing to it.
 
ok, ill try that, thanks

that unfortunately did not help. one strange thing that I noticed is if I set D0 to HIGH Q7 (out) also stays permanantly at high.
 
Last edited:
Is your LED also connected like in the image in your original post? The flat side of the LED is usually the cathode. In the image, the anode is connected to ground and the cathode is connected to the output of the IC.
*Edit - Something else... the serial data input (Pin 10) can't be left floating either. I suggest connecting it to gnd.
 
Last edited:
I have solved the issue, thanks, It seems to work with the exception of the 8th bit when I use the attiny though the data which I am recieving does not match the pin number I am guessing that this is due to either the programming or strange circumstances such as the one surroding the 8th bit...
thanks for your input.
 
PISO shift registers work this way :
You have to send a LATCH pulse on the latch pin to latch the state of the buttons you've pressed. Depending on your chip, the 1st output will come out of your chip. After the first data was sent via serial, you have to give it's clock a signal a low-high-low pulse which says to the chip "get the 2nd button out of me". Works this way

_
latch __________| |____________________(LATCH INPUT TO CHIP)
_ _
clock ________________| |___| |_________(CLOCK INPUT TO CHIP)
_ _ _
data _______________| |___| |___| |______ (DATA OUT OF THE CHIP)
 
Status
Not open for further replies.

Latest threads

Back
Top