Matrix keyboard

Z MAM wiki

Přejít na: navigace, hledání

Matrix keyboard looks like this:

It can be connected like this (you may use different microprocessor, this is just an example):

Soubor:IC-matrix keyb.png

Choose whatever microprocessor you like (among those we have), connect also some LED(s) using ideas from our previous seminar and:

  • detect and indicate that one particular key is pressed (plan your keyboard connection but at this moment you may just use one wire instead of the keyboard)
  • connect the keyboard, detect that ANY key is pressed
  • detect WHICH key is pressed

Input pins are configured by both DDRx and PORTx:

DDRx PORTx pin function
0 0 input without pull-up rezistor
0 1 input with pull-up rezistor

Good way to test input is to read PINx via SBIS or SBIC instruction.

Osobní nástroje