hysteresis
New Member
A simple solution, which you might consider, would be to use an EPROM to perform the encoding. A 4096 x 8bit device (such as a 2732A) has 12 address lines - one for each pushbutton, with only four of its data lines required for your binary encoded output.danuke said:I'm using it to encode 12 pushbuttons into a 4 bit code. It's not for a keypad per say but something similar. It's just going to take the 12 pushbuttons and make it into a 4 bit binary value so that it can be used with less traces to be run, etc on a pcb.
The binary output code would have to be programmed into just 12 memory locations - those accessed when a single address line is asserted, e.g.
address 0000 0000 0001 would hold 0000 0001
address 0000 0000 0010 would hold 0000 0010
address 0000 0000 0100 would hold 0000 0011
address 0000 0000 1000 would hold 0000 0100
address 0000 0001 0000 would hold 0000 0101
and so on, up to
address 1000 0000 0000 would hold 0000 1100
All other locations could be filled with zeros, so that if two (or more) buttons were pressed simultaneously, the output would be zero.
2732 type EPROM's are now obsolete (superseded by much higher capacity devices), though they can still be regularly found on a certain auction web site. Alternatively, a higher capacity device could be used, with the unwanted extra address lines tied to ground.