Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | Matrix Keypad Interface

Discussion forum for the BasicX family of microcontroller chips.

Matrix Keypad Interface - jasongarbus - Apr 14 18:29:00 2003

Can someone help with this? I need to interface a 4x4 matrix keypad
to a basicx and output this as 8-bit BCD. Also is there a way to do
key mapping? At present Im using a Fairchild keypad decoder IC or
this project but the problem is it wont allow me to assign the rows
and colums to the output I would like "row 1 col 4 on the keypad is A
but the chip sees it as 4" Any help would be great

Jason





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Matrix Keypad Interface - Sloan Thrasher - Apr 14 21:36:00 2003

Hi Jason!

You should be able to translate the bytes sent from the keypad chip pretty
easily. Assuming the byte in a sharacter, you setup two strings, one for the
values returned by the keypad, one for the values you want. like this:

src = "0123456789ABCDEF"
dst = "5678ABCD012349EF"

Rslt = Mid(dst,Instr(src,KeyPadChar),1)

(not tested on BX24)

This assumes that the character from the keypad is in KeyPadChar, and the
result is put into Rslt.

In the example above, a "4" from the keypad would become "A", a "0" from the
keypad would become "5", and so on.

If it's returning a byte value of 4 instead of an ASCII "4", you could build
your character string like:

src = chr(0) + chr(1) + chr(2) + chr(3) + chr(4) + ... etc...

In any case, check the syntax on the BX24 first, but the idea above should
work.

Sloan ----- Original Message -----
From: "jasongarbus" <>
To: <>
Sent: Monday, April 14, 2003 7:29 PM
Subject: [BasicX] Matrix Keypad Interface > Can someone help with this? I need to interface a 4x4 matrix keypad
> to a basicx and output this as 8-bit BCD. Also is there a way to do
> key mapping? At present Im using a Fairchild keypad decoder IC or
> this project but the problem is it wont allow me to assign the rows
> and colums to the output I would like "row 1 col 4 on the keypad is A
> but the chip sees it as 4" Any help would be great
>
> Jason




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

RE: Matrix Keypad Interface - Harry J. White - Apr 15 10:13:00 2003

Since your going to be interfacing with a keypad then your going to want to
see the digits as you enter them. Matrix Orbital sells a Serial LCD with a
keypad interface. The device works well and you can communicate with it via
a 232 or I2c interface. I currently have two projects that use the LCD with
an I2c interface (one with a BX24 and one with a PIC16f84). The LK162 has a
12 key interface (4 col X 3 row) and a 2 x 16 display. I uploaded code that
includes the keypad translation stuff a long time ago. I think it's listed
in the file section under "Protense code". I just checked their website and
they have some that will do 25 keys.
(www.matrixorbital.com/products/lk202-25.htm)
Let me know if you want any more details.
Harry

-----Original Message-----
From: jasongarbus [mailto:]
Sent: Monday, April 14, 2003 7:29 PM
To:
Subject: [BasicX] Matrix Keypad Interface Can someone help with this? I need to interface a 4x4 matrix keypad
to a basicx and output this as 8-bit BCD. Also is there a way to do
key mapping? At present Im using a Fairchild keypad decoder IC or
this project but the problem is it wont allow me to assign the rows
and colums to the output I would like "row 1 col 4 on the keypad is A
but the chip sees it as 4" Any help would be great

Jason [Non-text portions of this message have been removed]





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Re: Matrix Keypad Interface - Doug Sutherland - Apr 15 10:24:00 2003

Aside from external 3rd party hardware like chips
and the matrix orbital (nice but expensive) you
might want to look at this:

Reading buttons and switches
http://www.basicx.com/Products/BX-24/Code_Examples/Buttons_BX24.zip

Reading a 4x4 matrix keypad
http://www.basicx.com/Products/BX-24/Code_Examples/Keypad_BX24.zip

-- Doug




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Matrix Keypad Interface - jasongarbus - Apr 15 17:18:00 2003

If I use the I2c bus how far can I run it? The BCD was going to run
over some distance but I could modify the project. If I cant ust the
I2c bus maybe 485????not sure now.

Thanks --- In , "Harry J. White" <hwhite@d...> wrote:
> Since your going to be interfacing with a keypad then your going to
want to
> see the digits as you enter them. Matrix Orbital sells a Serial
LCD with a
> keypad interface. The device works well and you can communicate
with it via
> a 232 or I2c interface. I currently have two projects that use the
LCD with
> an I2c interface (one with a BX24 and one with a PIC16f84). The
LK162 has a
> 12 key interface (4 col X 3 row) and a 2 x 16 display. I uploaded
code that
> includes the keypad translation stuff a long time ago. I think
it's listed
> in the file section under "Protense code". I just checked their
website and
> they have some that will do 25 keys.
> (www.matrixorbital.com/products/lk202-25.htm)
> Let me know if you want any more details.
> Harry
>
> -----Original Message-----
> From: jasongarbus [mailto:jasongarbus@y...]
> Sent: Monday, April 14, 2003 7:29 PM
> To:
> Subject: [BasicX] Matrix Keypad Interface > Can someone help with this? I need to interface a 4x4 matrix keypad
> to a basicx and output this as 8-bit BCD. Also is there a way to do
> key mapping? At present Im using a Fairchild keypad decoder IC or
> this project but the problem is it wont allow me to assign the rows
> and colums to the output I would like "row 1 col 4 on the keypad is
A
> but the chip sees it as 4" Any help would be great
>
> Jason > > [Non-text portions of this message have been removed]



______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

RE: Re: Matrix Keypad Interface - Harry J. White - Apr 16 9:17:00 2003

The distance limit has a lot to do with the speed of transmission. I have
seen it successful used at 400k bits at a distance of 20 feet. I2c was
originally designed as a inter chip communications protocal and doesn't
specify twisted pair but I'm sure that it would help. 485 could be used at
long distance but then it would have to be translated at the LCD end.
Harry

-----Original Message-----
From: jasongarbus [mailto:]
Sent: Tuesday, April 15, 2003 6:19 PM
To:
Subject: [BasicX] Re: Matrix Keypad Interface If I use the I2c bus how far can I run it? The BCD was going to run
over some distance but I could modify the project. If I cant ust the
I2c bus maybe 485????not sure now.

Thanks --- In , "Harry J. White" <hwhite@d...> wrote:
> Since your going to be interfacing with a keypad then your going to
want to
> see the digits as you enter them. Matrix Orbital sells a Serial
LCD with a
> keypad interface. The device works well and you can communicate
with it via
> a 232 or I2c interface. I currently have two projects that use the
LCD with
> an I2c interface (one with a BX24 and one with a PIC16f84). The
LK162 has a
> 12 key interface (4 col X 3 row) and a 2 x 16 display. I uploaded
code that
> includes the keypad translation stuff a long time ago. I think
it's listed
> in the file section under "Protense code". I just checked their
website and
> they have some that will do 25 keys.
> (www.matrixorbital.com/products/lk202-25.htm)
> Let me know if you want any more details.
> Harry
>
> -----Original Message-----
> From: jasongarbus [mailto:jasongarbus@y...]
> Sent: Monday, April 14, 2003 7:29 PM
> To:
> Subject: [BasicX] Matrix Keypad Interface > Can someone help with this? I need to interface a 4x4 matrix keypad
> to a basicx and output this as 8-bit BCD. Also is there a way to do
> key mapping? At present Im using a Fairchild keypad decoder IC or
> this project but the problem is it wont allow me to assign the rows
> and colums to the output I would like "row 1 col 4 on the keypad is
A
> but the chip sees it as 4" Any help would be great
>
> Jason > > [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Matrix Keypad Interface - John Ely - Apr 16 18:12:00 2003


>If I use the I2c bus how far can I run it? The BCD was going to run
>over some distance but I could modify the project. If I cant ust the
>I2c bus maybe 485????not sure now.
>Re: Matrix Keypad Interface

Jason,

You can use on I2C buss over an extended range by using a
special chip at each end. The chip is type 82B17 and it is
made by Philips.

I use an I2C bus that is about 70-80 feet long. My hook-up
can be seen at http://zeus.ia.net/~kwradio/BasicX/ Some
claim to have used these chips for a mile long bus.

Regards,

John Ely, W0GN


______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )