Share
View previous topicGo downView next topic
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

How Does a Matrix Keypad Works?

on Fri Sep 08, 2017 5:07 am



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
Newbie
Newbie
Posts : 1
Join date : 2017-09-10
View user profile

Re: How Does a Matrix Keypad Works?

on 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?
Newbie
Newbie
Posts : 1
Join date : 2017-09-11
View user profile

Re: How Does a Matrix Keypad Works?

on 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
avatar
Newbie
Newbie
Posts : 1
Join date : 2017-09-11
Location : Planet Earth
View user profile

Re: How Does a Matrix Keypad Works?

on 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?
Newbie
Newbie
Posts : 1
Join date : 2017-09-11
Age : 18
View user profile

Re: How Does a Matrix Keypad Works?

on 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!
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

Re: How Does a Matrix Keypad Works?

on 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.
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

Re: How Does a Matrix Keypad Works?

on 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.
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

Re: How Does a Matrix Keypad Works?

on 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.
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

Re: How Does a Matrix Keypad Works?

on 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.
avatar
Newbie
Newbie
Posts : 1
Join date : 2017-09-13
View user profile

Re: How Does a Matrix Keypad Works?

on 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?
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

Re: How Does a Matrix Keypad Works?

on 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.
Newbie
Newbie
Posts : 1
Join date : 2017-09-15
View user profile

Re: How Does a Matrix Keypad Works?

on 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?
avatar
Admin
Admin
Posts : 18
Join date : 2017-09-07
Age : 19
Location : Dasmarinas City, Cavite Philippines
View user profilehttp://ilabmp.forumotion.asia

Re: How Does a Matrix Keypad Works?

on 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

Re: How Does a Matrix Keypad Works?

View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum