iLab Micro Programming
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty How Does a Matrix Keypad Works?

Fri Sep 08, 2017 5:07 am
How Does a Matrix Keypad Works? Keyboardmatrix


A Matrix Keyboard Scanning Algorithm is an algorithm that a microprocessor uses to search a keyboard matrix to determine if any of the keys are pressed. Alexan Training Module 2 also uses this matrix.
This is how a keyboard matrix works:
When no key is pressed, all columns read high. Any key being pressed will cause one of the columns to go low (the column that contains the key that was pressed). So, to see if a key has been pressed, a microprocessor only needs to see if any of the input lines are low. Once the microprocessor has detected that a key has been pressed, it just needs to find out which key it was. This process is quite simple. As mentioned, the microprocessor first detects the column and then it detects the row of the column of the pressed key. The key can only be on one row, so the microprocessor outputs a low on only one of the rows. If it finds a 0 (low) on the input port, the microprocessor knows that the pressed key occurred on the selected row. Conversely, if the input port had all highs, the key pressed was not on that row and the microprocessor selects the next row, repeating the process until it finds the row. Once the row has been identified, the specific column of the pressed key can be established by locating the position of the single low bit on the input port.
Feel free to ask questions and clarifications Smile
avatar
ndreanicoke
Newbie
Newbie
Posts : 1
Join date : 2017-09-10

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Sun Sep 10, 2017 9:37 pm
What if I want to mix the output of the two keys? Will it do if I press the two keys simultaneously?
avatar
vnssdzs
Newbie
Newbie
Posts : 1
Join date : 2017-09-11

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 4:41 am

What if I doublepress the key? Will it still work the same as it work in single press? Question
ajaex
ajaex
Newbie
Newbie
Posts : 1
Join date : 2017-09-11
Location : Planet Earth

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 8:37 am
1. What would be the result of pressing 2 or more keys at the same time?
2. What if I wanted to press one key longer with a shorter one, what would happen?
avatar
_rjdelacruz
Newbie
Newbie
Posts : 1
Join date : 2017-09-11
Age : 24

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 8:50 am
Ano po yung kailangan na voltage for matrix keypad? Paano po kung iba yung voltage na nagamit ko? Thanks!
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 8:53 am
vnssdzs wrote:
What if I doublepress the key? Will it still work the same as it work in single press?  Question

opo. kasi masyado namang mabilis ang mcu kaya kaya nyang iprocess ang mabibilis na pindot.
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 9:09 am
ajaex wrote:1. What would be the result of pressing 2 or more keys at the same time?
2. What if I wanted to press one key longer with a shorter one, what would happen?


1. sa sobrang bilis ng MCU natin, hindi nya yun natatake as sabay-sabay. Maybe for us it looks like you're pushing the buttons at the same time but in reality, if we take a faster look, hindi talaga sya sabaysabay.

2. You may create timers in your program checking the duration of the press.
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 9:11 am
ndreanicoke wrote:What if I want to mix the output of the two keys? Will it do if I press the two keys simultaneously?

remember that this circuit is only collecting inputs from the user. Manipulating and processing those inputs are up to the program inside your microcontrollers.
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Mon Sep 11, 2017 9:16 am
_rjdelacruz wrote:Ano po yung kailangan na voltage for matrix keypad? Paano po kung iba yung voltage na nagamit ko? Thanks!

wala naman pong ideal voltage. It will all depend sa working voltage ng MCU natin. In your case, using Atmel 2051 Microcontroller, ideal voltage natin is 5volts.
kamil
kamil
Newbie
Newbie
Posts : 1
Join date : 2017-09-13

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Wed Sep 13, 2017 8:22 pm
what if there is no resistors connected in series in both rows and columns of the keypad? will it still work without resistors?
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Thu Sep 14, 2017 8:10 am
kamil wrote:what if there is no resistors connected in series in both rows and columns of the keypad? will it still work without resistors?

When the circuit is closed by the switches, resistor is the only load it has. unless you want to short your circuit you'll do it without the resistors. It may work but it is prone in shorting the circuit and damaging the mcu.
avatar
Lizaaaaaaa
Newbie
Newbie
Posts : 1
Join date : 2017-09-15

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Fri Sep 15, 2017 8:35 am
Pwede po bang gawing control like up,down,left and right yung keypad matrix? or icoconnect sya sa sensor and magseserve sya as controller or nah? I need a different button talaga?
bryaliben
bryaliben
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 25
Location : Dasmarinas City, Cavite Philippines
http://ilabmp.forumotion.asia

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Fri Sep 15, 2017 12:36 pm
Lizaaaaaaa wrote:Pwede po bang gawing control like up,down,left and right yung keypad matrix? or icoconnect sya sa sensor and magseserve sya as controller or nah? I need a different button talaga?

oo naman po. but if konti lang naman ang controls na gagawin mo better to use seperate buttons nalang po Smile
Sponsored content

How Does a Matrix Keypad Works? Empty Re: How Does a Matrix Keypad Works?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum