Author Topic: problems with 74HC165 PISO Shift Register  (Read 5037 times)

0 Members and 1 Guest are viewing this topic.

Offline King_bobTopic starter

  • Newbie
  • Posts: 7
problems with 74HC165 PISO Shift Register
« on: February 08, 2014, 10:12:55 pm »
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)



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?


I solved the flickering by adding a pulldown on pins 1&2, but the data is still not coming out quite correctly.
« Last Edit: February 08, 2014, 10:51:58 pm by King_bob »
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2905
  • Country: gb
Re: problems with 74HC165 PISO Shift Register
« Reply #1 on: February 08, 2014, 11:07:26 pm »
Some things, one of which you have discovered:

74HC inputs are very high impedance and will pick up random rubbish if left unconnected. Pins 1&2 weren't connected to anything unless the switches were pressed - this is why you needed to add resistors.

PL (pin 1) is active LOW so you need to pull it UP and have the switch ground pin 1

You don't have any debounce - when you push the switch the 74HC165 will actually see several pulses. Google switch bounce or look through the forum as there were some threads recently on this subject.

Oh, and you don't have any decoupling which is probably not significant but it never hurts to add 0.1uF or so close to each IC between VCC and ground.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5022
  • Country: ro
  • .
Re: problems with 74HC165 PISO Shift Register
« Reply #2 on: February 09, 2014, 12:24:34 am »
Probably Fritzing : http://fritzing.org/home/
 

Offline King_bobTopic starter

  • Newbie
  • Posts: 7
Re: problems with 74HC165 PISO Shift Register
« Reply #3 on: February 09, 2014, 12:56:11 am »
yes the picture is made with fritzing, as for the switch bounce, I have the problem regardless wheather I use buttons or attiny85, one strange issue is that when D0 gets set to HIGH Q7 (data out) also goes high, regadles of the load or clock.

EDIT: Problem has been solved, Thanks
« Last Edit: February 09, 2014, 01:39:15 am by King_bob »
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2905
  • Country: gb
Re: problems with 74HC165 PISO Shift Register
« Reply #4 on: February 09, 2014, 09:34:28 am »
Quote
EDIT: Problem has been solved, Thanks

And the problem was.....?
 

Offline King_bobTopic starter

  • Newbie
  • Posts: 7
Re: problems with 74HC165 PISO Shift Register
« Reply #5 on: February 09, 2014, 12:01:44 pm »
switch bounce was the first problem, then after attachting the attiny again, I had a small code issue, unfortunately pin 8 is still a problem, but that is something that I can ignore.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf