Notifications
Clear all

Question about 74hc165 shift register  


Royz
 Royz
(@royz)
Active Member
Joined: 11 months ago
Posts: 6
Topic starter  

The example wiring diagram in the shift register presentation uses individual pull down resistors for each switch connected to the 74HC165.  Could not all the switches be connected to a single resistor which is then connected to ground, especially if only intend to use single switch at a time?


Quote
Royz
 Royz
(@royz)
Active Member
Joined: 11 months ago
Posts: 6
Topic starter  

I suppose if you are going to use resistors, one could also string a series of them in a multistage voltage divider and connect switches at each junction point.  Then each switch would output a different voltage that could be fed to a single analog input.  Power, ground and one analog pin would be all that is needed and not 74 chip.  I assume this is how a keypad by ILS I saw on Amazon works?


ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 856
 

@royz

No, that wouldn't work, you would be literally shorting all of the inputs together!  Take a look at the schematic and you'll see what I mean.  The pulldowns keep each digital input low, pressing a switch brings the input high.

Posted by: @royz

I assume this is how a keypad by ILS I saw on Amazon works?

Yes, I have already covered that keypad in my LCD article and video, it uses one Arduino analog input. But, of course, that's a completely different subject!

😎

Bill

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


ReplyQuote