Shop OBEX P1 Docs P2 Docs Learn Events
Exploring Cutting Edge Technology With the Parallax 4x4 Matrix Membrane Keypad (#27899) — Parallax Forums

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

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2018-12-02 06:37 in BASIC Stamp
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
«1

Comments

  • kwinnkwinn Posts: 8,697
    Definitely recommend using the four resistors shown in the diagram for the stamp no matter what uC you hook it up to.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-26 21:36
    Thank you Kwinn and Tom

    Will use resistors or maybe pulldown resistors.

    Tonight will get parts together and do run code.

    Happy Hoidays!

  • 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.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-11-27 06:00
    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.



  • " 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

  • 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.
  • 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.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-11-27 07:00
    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)
  • 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,194
    edited 2018-11-27 14:55
    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!
  • 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,194
    edited 2018-11-27 16:24
    " 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/

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-11-27 16:23
    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.
  • Your URL contains the word "hexagon", which is a six-sided polygon

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-27 17:12
    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.
  • 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.

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-28 03:24
    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
  • Mike GreenMike Green Posts: 23,101
    edited 2018-11-28 04:36
    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/


  • 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.

  • 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.
  • 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.
  • 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.
  • 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!
Sign In or Register to comment.