zia.newversion
Member level 5
Hi there.
I always wondered how the keyboards/keypads worked. I found out a while ago that it is nothing but a simple matrix of push switches such that each switch has one end connected to a common column line and the other connected to a common row line... What you can do is, poll either columns and scan for a signal on rows or poll rows and scan for a signal on columns. The problem with this approach is, I don't know why, but it looks too shabby to me. I improvised and though instead of continuously polling/scanning the lines, why not provide constant power at either of rows/columns and wait for an interrupt on the other side (through an OR gate, perhaps). But once the ISR is executed, the program will again have to poll/scan the lines to check which one was pressed... And if the button is pressed for so short an interval that as the controller enters ISR, the signal on the scanning end has gone off, the input will go waste. The controller knows a button was pressed, but doesn't know which one.!
What I meant to ask was, is there any other, more advanced method of implementing a keypad/keyboard?
If you haven't seen it work yet, but have a novel idea, it is more than welcome.
Waiting for your input.
- Zia
I always wondered how the keyboards/keypads worked. I found out a while ago that it is nothing but a simple matrix of push switches such that each switch has one end connected to a common column line and the other connected to a common row line... What you can do is, poll either columns and scan for a signal on rows or poll rows and scan for a signal on columns. The problem with this approach is, I don't know why, but it looks too shabby to me. I improvised and though instead of continuously polling/scanning the lines, why not provide constant power at either of rows/columns and wait for an interrupt on the other side (through an OR gate, perhaps). But once the ISR is executed, the program will again have to poll/scan the lines to check which one was pressed... And if the button is pressed for so short an interval that as the controller enters ISR, the signal on the scanning end has gone off, the input will go waste. The controller knows a button was pressed, but doesn't know which one.!
What I meant to ask was, is there any other, more advanced method of implementing a keypad/keyboard?
If you haven't seen it work yet, but have a novel idea, it is more than welcome.
Waiting for your input.
- Zia