Whats the opposite of a shift register?

im making a door locking mechanism with the spark fun 12 digit keypad and i wanted to know if there is an ic that acts like an shift register but backward i.e. take in a number of inputs like 8 and condenses them to like 3 pins, to save space. Thanks in advance!

Thank you so very much =)

A regular shift-register, like a 74HC595, is actually known as a "serial-input, parallel output shift register"; you can get the opposite - a "parallel-input, serial output shift register" - where you latch the input data on the parallel lines, then clock it out. The 74HC165 is an example:

:slight_smile:

and its used basically the same way as the shift register just in reverse right?

retrolefty - I'm not sure the OP wants an encoder (he may?); his question regarding using a shift-register and using it in an opposite manner, taking 8-bits and reducing to three lines (ground, clock, serial data) - led me believe what was wanted was a PISO shift-register...

:-?

and its used basically the same way as the shift register just in reverse right?

Not sure if you are asking me or retrolefty, but the 165 is used by placing the data on the 8 input lines, latching it, then clocking the clock line and reading the serial line.

This, versus a SIPO (serial-in, parallel out) shift register, where you clock the data out the serial line, and latch it over to the 8 output lines.

So yes, in a way, it is in reverse...

and its used basically the same way as the shift register just in reverse right?

I recommended the 74LS348 encoder chip based on what you wanted not what you wished to call it. A 8 input to 3 bit binary output is called an encoder chip. That may or may not be what you actually need. If You require a chip to just expand on the number of digital input pins you can wire up and read, then a parallel input, serial output register could be something you can use. Keep in mind that in that mode how quick your sketch can detect a changing input pin is determined by how often you keep shifting in the serial data and comparing it with your previous reading.

Shift registers have no real logical 'opposite' name, but just different modes of operation. Some shift registers can do serial in to parallel out, some can do parallel in to serial out, some have multiple modes of operation.

The better your explanation of what you require the better the quality of the recommendation you will get back, normally. :wink:

Lefty

One problem with an encoder on a set of buttons is the unknown results when more than one button is pressed.

Another problem is that a keypad is usually not a set of buttons, but a matrix. Half those wires will be inputs to the button, the other half outputs, and they must be scanned to see what is being pressed.

-j

well the 12 digit keypad is the sparkfun.com one http://www.sparkfun.com/products/8653 it takes different inputs and lets you know what numbers it is so like if you get an input from pin 2 and 3 then the number is one

Heres the chart

2+3 = 1
1+2 = 2
2+5 = 3
3+7 = 4
1+7 = 5
5+7 = 6
3+6 = 7
1+6 = 8
5+6 = 9
3+4 = *
1+4 = 0
5+4 = #

I think the OP wanted a 74165- Parellel IN Serial Out device... It's still a shift register but it is the opposite of what we no de facto call a shift register... the '595.

One problem with an encoder on a set of buttons is the unknown results when more than one button is pressed.

Absolutely not.

A Priority Interrupt Encoder is just that... a device that gives priority to the input pins in a KNOWN way.

In the case of the 348... if PIN 1 & PIN 7 both go LOW... PIN 7 "wins". Always.