Exploring Cutting Edge Technology With the Parallax 4x4 Matrix Membrane Keypad (#27899)

microcontrollerusermicrocontrolleruser Posts: 1,155
edited December 2 in BASIC Stamp Vote Up0Vote Down
Puttering Around didn't have enough punch in it.

Here's the product page.

https://www.parallax.com/product/27899

Here's the little manual from that page.

https://www.parallax.com/sites/default/files/downloads/27899-4x4-Matrix-Membrane-Keypad-v1.2.pdf

Plan is to run BS2 code for it.

Any tips on this?

Parallax%20Matrix%20Keypad.png
Experimenter

WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
300 x 300 - 36K
«1

Comments

  • 41 Comments sorted by Date Added Votes
  • Definitely recommend using the four resistors shown in the diagram for the stamp no matter what uC you hook it up to.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • microcontrollerusermicrocontrolleruser Posts: 1,155
    edited November 26 Vote Up0Vote Down
    Thank you Kwinn and Tom

    Will use resistors or maybe pulldown resistors.

    Tonight will get parts together and do run code.

    Happy Hoidays!
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK

  • Got keypad out.

    Do you change the asterisk and pound sign to letters E and F to enter hex?

    Just found out the other day that is why these keypads are 16 buttons. Hex.
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Peter JakackiPeter Jakacki Posts: 7,868
    edited November 27 Vote Up0Vote Down
    If you want to enter hex you really need more than 16 keys since you need some way of hitting enter or clearing an entry etc. You can put whatever stickers you want over the keys but at the end of the day all you get to read out is a code formed from software actively scanning the matrix for a keypress. You can use that code directly or use a lookup table to translate it into something more friendly such as ASCII 0..9 etc.

    BTW - I don't get your "cutting edge" title. Keypads are about as blunt edge as you can get. The software though is not really trivial if it is done right but with the BS2 if you are not checking/scanning it when a button is pressed then you will miss it. The Propeller can easily scan this in the background and on other micros they use interrupts.



    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia

  • " need more than 16 keys '

    This says you can enter numeric or hex with a 4x4 matrix keypad.

    http://www.futurlec.com/Mini_Keypad.shtml

    I will find out how that is done a few months. Hopefully.

    " I don't get your "cutting edge" title. Keypads are about as blunt edge as you can get.'

    It's tongue in cheek humor. Will call next one 'Fumbling Around With'

    Like to keep it interesting and entertaining.

    Laugher is a vacation-Milton Berle

    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Yes, of course you CAN enter hex with 16 keys but which key do you press to say ENTER or CLEAR? It's like being able to type a message into you phone but not having a send button! Now, that would be humorous.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • microcontrolleruser,

    Your program can interpret the keypad any way that you want.

    You can add pushbuttons for more keys or as Peter said get a bigger keypad such as a 20 key one.

  • I'm not going to skip ahead in my lessons to look it up I have a full plate already.

    Futurlec has been around as long as Parallax and if they say it can be done it can.

    I am going to work on this in the morning.

    I'll remember next Stamp project. I know it's not stepper motor.
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Peter JakackiPeter Jakacki Posts: 7,868
    edited November 27 Vote Up0Vote Down
    I'm baffled by your statement putting so much faith in a "who cares just sell it sales description" vs the obvious that anyone technical or non-technical can plainly see. But please work on it and let us know how you can fit 16 hex keys and 2 or more function keys on a 4x4 keypad.
    I'm having an interesting "vacation" already!

    Edit: if you get stuck I'm sure Futurlec will be able to tell you (something)

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • You could, I suppose, designate one of the keys as a "shift key" to allow two interpretations for each remaining key. That would make it awkward to enter hex but it would be possible.
  • microcontrollerusermicrocontrolleruser Posts: 1,155
    edited November 27 Vote Up0Vote Down
    Good morning to all!

    Here is how it is done with a 'different micro'.

    https://www.google.com/search?q=pic+hexagon+input+with+matrix+keypad&ie=utf-8&oe=utf-8&client=firefox-b-1

    Shouldn't be hard to convert that to Pbasic.At least the concept.

    I saw something about reading keypad with SERIN.

    You can always add a single pushbutton for ENTER.

    I don't think my book lessons are going to cover hex input.

    Okay.Back to doing the Parallax keypad manual code.

    I need to go get the pack of 1k resistors.

    Happy Holidays!
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • This goes to show you what happens sometimes when two groups of people get together with widely varying levels of experience ... the elephant and the blind men story comes to mind. microcontrolleruser (and Futurelec) is talking about just scanning a 4x4 matrix keypad, producing a 4-bit code for each of the 16 keys that might be pressed. Everybody else is talking about "entering hex data" using the keypad which indeed can require 18 distinct functions ... 16 for the hexadecimal data, 1 for a clear or delete operation and 1 for an enter operation. These are different problems with different solutions although the latter is really an extension of the former.
  • microcontrollerusermicrocontrolleruser Posts: 1,155
    edited November 27 Vote Up0Vote Down
    " Everybody else is talking about "entering hex data" using the keypad"

    For better or worse. It was I who brought that up.

    "widely varying levels of experience "

    I caught that oblique comment to you keep referring to what I know and don't know.

    When it comes to a 'different micro' assembler, I will leave you in the dust.

    Not because of the years put it but because what I've learned is rock solid.

    Back to Stamp keypad.

    Can't find 10 pack of 1k resistors.Looking through other tackle box of resistors.

    Edit:Here's a good resistor guide.Very handy.

    http://resistor.cherryjourney.pt/

    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Peter JakackiPeter Jakacki Posts: 7,868
    edited November 27 Vote Up0Vote Down
    Do you change the asterisk and pound sign to letters E and F to enter hex?
    Sounds exactly like he wants to enter hex, not just output "hex".
    Any tips on this?
    Plenty, but it sounds like you just don't understand the tips.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • Your URL contains the word "hexagon", which is a six-sided polygon

    Larry

    If the grass is greener on the other side...it's time to water your lawn.
  • microcontrollerusermicrocontrolleruser Posts: 1,155
    edited November 27 Vote Up0Vote Down
    Okay. Change it to hexadecimal and that will be the search.

    Futurlec says it's can be used for hex and that is good enough for me. So I'm done with it.DONE.

    Found 1k resistors!

    I will assemble this keypad circuit and run code.
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Another nice way to handle a 4x4 matrix keypad is described in Nuts and Volts Column #97 using a 74C922 keyboard scanner chip. This chip automatically handles 2-key rollover. The article shows how to interface to a Basic Stamp and an LCD, but it can also be operated with a supply voltage of 3.3V which is compatible with the Propeller.
  • It is possible to double the use of the 4x4 / 16 keypad. I pre-define the 16 keys as Integers AND as String Characters in my program code. So if I am looking to enter an Integer I look for the returned numbers - and if I want to use the same Keypad for special key-strokes, I look for String Characters in my user code. BTW - you can't mix the two definitions in the same program function, but it an option to maximize you keypad usefulness. Second BTW - I use the FutureLec *Touch Keypad* with the RS-232 option to save on input pin use.

  • Thank you Mike!

    The Stamp Professional board has a header for a Parallax parallel (14 pin not serial) LCD. but not one for a keypad.

    I don't think I have seen a lot of Parallax boards or kits with a keypad.

    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • microcontrollerusermicrocontrolleruser Posts: 1,155
    edited November 28 Vote Up0Vote Down
    Thank you PropGuy2

    "Second BTW - I use the FutureLec *Touch Keypad* with the RS-232 option to save on input pin use"

    I have not spotted that one yet.

    Here's what they call a 'Decoder' . I just noticed it includes a serial connection. Like the Parallax serial LCD.

    http://www.futurlec.com/Keypad_Decoder_Board.shtml
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Mike GreenMike Green Posts: 22,826
    edited November 28 Vote Up0Vote Down
    It looks like the "Keypad Decoder Board" has some kind of microcontroller on it to do the work of scanning the keypad, translating the scan information to characters or keycodes, then generating the serial characters for output ... sort of what the Basic Stamp (or Propeller or whatever) is supposed to do.

  • Thank you Mike!

    "The article shows how to interface to a Basic Stamp and an LCD"

    I think adding keypad and LCD makes a controller more interesting to work with.

    You can do more in your project.

    I am going to see about finishing this keypad experiment and do the stepper motor one next/

    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK

  • Put the hardware together.

    Ran the program and got 'unexpected results'.

    It continuously puts lines of nonsense on the debug terminal.

    I will look at it in the morning for copy and paste errors.

    Will look at comments and see what it is supposed to.

    Maybe that will help find where the error is.

    Have the IC out for running the stepper motor manual code next.
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK

  • Is this program supposed to scroll constantly?

    Let me run it again and see exactly what it is doing.

    It didn't look right to me so I just figured something was wrong.
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • microcontrolleruser,

    What program?

  • Genetix

    The one in the manual. The download on the product page at Parallax.com

    Been using those to demo these parts we've had laying around.
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
  • Genetix

    The one in the manual. The download on the product page at Parallax.com

    Been using those to demo these parts we've had laying around.

    You really should post links. Even I don't know which program, which manual, which product page you are referring to.
    These are critical to answer your questions.
    Infernal Machine
  • microcontrolleruser,

    Remember that it's a demo program so you can see the keypad working.
    It continuously scans the keypad and updates the screen as keys are pressed or released.

    https://www.parallax.com/sites/default/files/downloads/27899-4x4-Matrix-Membrane-Keypad-v1.2.pdf

  • Publison

    Yes. I should.Will do. Genetix found the right one.

    Genetix

    Let me run it again tonight and pay attention to what program is doing.

    Happy Holidays!
    Experimenter

    WANTED SX BLITZ JAVELIN STAMP P24 & P40 DEMO BOARD SX48/52 BOARD APPMODS NO JUNK
Sign In or Register to comment.