lats
Full Member level 4
Matrix keypad
Hi,
I'm always confused with the keys. This time the confusion is on the peaks. I'm interfacing a 4x4 keypad with uC. I have made the code which displays the key number that has been pressed & is working absolutely fine. In this code i'm waiting continously for a key to be pressed .
I have to implement this in my project where this keypad will be used to enter password, certain physical values, etc. Now the problem is i can't wait continously for a key to be pressed, so should i call this function from Timer periodically or should I generate a common Interrupt for these 16 keys.
Second problem, if I have to enter a value lets say "1652" how do i need to read the keypad. I mean how should i alot the value, should I multiply the first key value with 1000 then second with 100 then third with 10 & finally add these all four, like 1*1000 + 6*100 + 5*10 + 2 = 1652
If someone can share a part of his code with me i'll be really thankful.
Thanks a lot all of you.
Hi,
I'm always confused with the keys. This time the confusion is on the peaks. I'm interfacing a 4x4 keypad with uC. I have made the code which displays the key number that has been pressed & is working absolutely fine. In this code i'm waiting continously for a key to be pressed .
I have to implement this in my project where this keypad will be used to enter password, certain physical values, etc. Now the problem is i can't wait continously for a key to be pressed, so should i call this function from Timer periodically or should I generate a common Interrupt for these 16 keys.
Second problem, if I have to enter a value lets say "1652" how do i need to read the keypad. I mean how should i alot the value, should I multiply the first key value with 1000 then second with 100 then third with 10 & finally add these all four, like 1*1000 + 6*100 + 5*10 + 2 = 1652
If someone can share a part of his code with me i'll be really thankful.
Thanks a lot all of you.