Re: Keypad interface?

Started by query_again March 8, 2006
Anyone has experience in connecting a 20X4 parallel LCD with 3X4 
Keypad directly, displaying the depressed key + sending the info BX-
24?

thanks in advance
	--- In basicx@basi..., "Don Kinzer" <dkinzer@...> wrote:
>
> --- In basicx@basi..., "arhodes19044" <spamiam@c...> wrote:
> > I have not tested the limit of the number of potential 
simultaneous 
> > keys, but 3 is no problem.
> 
> I believe that 3 is a problem in one particular case.  Consider 
four 
> keys that reside at the corners of any rectangle
in the matrix.  
If 
> you press any three of them, the fourth will
appear to be pressed 
> whether it is or not.  This is known as a "phantom key" and is 
caused 
> by there being a conductive path from a row line,
through the 
three 
> closed keyswitches to the column line of the key
that is not 
pressed, 
> thus making it appear that a key is closed at that
row/column 
> intersection.  The common way of preventing this is to use diodes 
in 
> series with the keys to prevent the circuitous
connection.
> 
> > This does use 7 pins, which is significant on the BX platform.  
Your 
> > reference to a multiplexing technique is well
received.
> 
> It occurred to me that you might be able to connect a 4x4 keypad 
using 
> only 2 I/O lines and only one external component -
a PCF8574 I/O 
> expander.  If you already have other I2C devices connected, the 
> incremental I/O line usage would be zero since you could use the 
same 
> SDA/SCL lines.
> 
> Although I haven't prototyped this circuit, I believe that it 
would 
> work to connect the row/column lines directly to
the expander's 
I/O 
> lines with no resistors.  The expander's output
stage is designed 
to 
> be tolerant of being shorted to ground when in the
logic 1 state.  
In 
> fact, the way that you prepare a pin for input is
to write a 1 to 
that 
> bit.  The PCF8574 and PCF8574A are about $2 at
DigiKey.  The 
> difference between the two parts is the I2C base address.
> 
> Don
> http://www.zbasic.net
>