A fast and simple 4x4 matrix keypad scanner for the 20X2, zero additional components; no diodes, no resistors required.
Returns zero when no key pressed, 1 to 16 when a key pressed. It also returns 17 to 60 when multiple keys pressed which can either be ignored or used depending on application. That also allows additional dual-pole buttons to be used to take a 16 button keypad up to a 40 button keypad - Would probably need better debouncing / press stabilised detection in those cases.
Returns zero when no key pressed, 1 to 16 when a key pressed. It also returns 17 to 60 when multiple keys pressed which can either be ignored or used depending on application. That also allows additional dual-pole buttons to be used to take a 16 button keypad up to a 40 button keypad - Would probably need better debouncing / press stabilised detection in those cases.
Attachments
-
3.6 KB Views: 800