Interfacing input switches to 74HC165 Shift Register

Thread Starter

Leigh

Joined Feb 11, 2010
20
Hi,



I have a project that uses the ATTiny167. I have 7 input switches. To read the state of the switches I poll them in a loop. To reduce the use of pins on the 167 I use a 74HC165 shift register ic. I tie the inputs of the 165 High, and have the switches connected to GND to take the input Low when activated. In the final application the switches will be located many metres away from this circuitry. What would you wise folk suggest I need as a buffer (if any) to the switched inputs of the 167?



I appreciate any comments / suggestions.

Leigh
 

crutschow

Joined Mar 14, 2008
34,462
Unless you are a very electrically noisy environment, I don't think you will need any added circuitry.
At most, a small capacitor to ground at the input, would suppress any noise.

Note that mechanical switch contacts generally bounce for several tens of milliseconds when activated.
Will that cause any problem in your application?
 

Thread Starter

Leigh

Joined Feb 11, 2010
20
Thanks crutschow. My reason for choosing to take the input Low on activation is that any "stray voltages" on the line would tend to keep the input tied high (I use resistors there, of course). Maybe I'm wrong. Any switch bounce shouldn't be a prob. I will read the inputs a couple of times with brief delay between, to confirm a meaningful reading.

I appreciate your response.
 

crutschow

Joined Mar 14, 2008
34,462
Thanks crutschow. My reason for choosing to take the input Low on activation is that any "stray voltages" on the line would tend to keep the input tied high (I use resistors there, of course). Maybe I'm wrong. Any switch bounce shouldn't be a prob. I will read the inputs a couple of times with brief delay between, to confirm a meaningful reading.
Noise pickup is AC by nature and so can be either polarity. Whether you tie the lines high or low will likely make little difference as to the noise sensitivity.
 
Top