Author Topic: matrix keyboard, needs a few tricks  (Read 3223 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
matrix keyboard, needs a few tricks
« on: November 02, 2015, 11:24:56 am »
hi
I have recycled a keyboard from a laptop, it has two headers, the first with 15 wires, the second with 18wire, so it seems a matrix 15x18, implementing a full QWERTY keyboard.

Which is the best way to interface and decode?
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: matrix keyboard, needs a few tricks
« Reply #1 on: November 02, 2015, 04:55:15 pm »
I've never seen how a laptop's internal keyboard interface with the motherboard, today I understood that in laptops the keyboard controller circuitry is located on-motherboard, so the keyboard connects directly with a matrix cable and directly handled by a custom controller-chip.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: matrix keyboard, needs a few tricks
« Reply #2 on: November 02, 2015, 05:00:20 pm »
I wander how good is the following
  • 64 keys: 2x PCF8574
  • 128 keys: 1x PCF8574 + 1x PCF8575
  • 256 keys: 2x PCF8575
 

Offline PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5139
  • Country: nl
Re: matrix keyboard, needs a few tricks
« Reply #3 on: November 02, 2015, 08:06:56 pm »
Some thoughts:

 - 15 x 18 is 270 keys, seems a bit on the high side?

 - Use a controller from an old AT keyboard and convert the scan codes into the proper codes?

 - If the rows or columns are just pulled high one by one you could use a shift register and use only one (or 2 for a reset) I/O port for that.

Keyboard error: Press F1 to continue.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: matrix keyboard, needs a few tricks
« Reply #4 on: November 02, 2015, 08:12:56 pm »
- 15 x 18 is 270 keys, seems a bit on the high side?

of course, 101 keys expected, I still have to reverse the matrix, I physically have two headers of 15 and 18 wires

Use a controller from an old AT keyboard and convert the scan codes into the proper codes?

I need to design a project from scratch in order to recycle the laptop chassis.

If the rows or columns are just pulled high one by one you could use a shift register and use only one (or 2 for a reset) I/O port for that.

I guess what happens about SHIFT+KEY, CTRL+KEY, etc
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12875
Re: matrix keyboard, needs a few tricks
« Reply #5 on: November 02, 2015, 08:19:23 pm »
All the left and right shift/ctrl/alt keys and Fn and Win keys usually have individual lines.  You can do two key rollover on a plain switch matrix, but if you have three keys down, with two in the same row, and two in the same column, unless each switch in the matrix has its own series diode (not practical for membrane matrix keyboards) you get a phantom key-press at the intersection of the row and column that only have one key pressed out of the set of three.   Thus if the user is going to press multiple shift keys, they cant be part of the main matrix.
« Last Edit: November 02, 2015, 11:23:09 pm by Ian.M »
 

Offline kfitch42

  • Frequent Contributor
  • **
  • Posts: 300
  • Country: us
Re: matrix keyboard, needs a few tricks
« Reply #6 on: November 02, 2015, 08:57:41 pm »
Which is the best way to interface and decode?

I think this covers most of what you are asking. Both the implied question of REing the keyboard, and the question of decoding a matrix keyboard (where "best" is defined as easy to implement, since you didn't explicitly define "best" in your context): http://playground.arduino.cc/Main/KeypadTutorial
 

Offline nidlaX

  • Frequent Contributor
  • **
  • Posts: 663
  • Country: us
Re: matrix keyboard, needs a few tricks
« Reply #7 on: November 02, 2015, 11:21:51 pm »
Here are a few excellent keyboard controller firmwares for the Atmel AVR:

1. Hasu's TMK Firmware: Github, Tutorial
2. Soarer's Keyboard Firmware
3. chrisandreae's Keyboard Firmware

You can also check out Deskthority and Geekhack for some inspiration on DIY projects!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf