{"id":1761,"date":"2011-02-13T22:02:58","date_gmt":"2011-02-14T03:02:58","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=1761"},"modified":"2012-07-30T09:29:23","modified_gmt":"2012-07-30T13:29:23","slug":"theory-of-matrix-keypad","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/theory-of-matrix-keypad\/","title":{"rendered":"Theory of Matrix Keypad"},"content":{"rendered":"<p>Tact switches are widely used as digital input devices. Normally one tact switch requires one digital I\/P pin of a microcontroller but if you want to interface a matrix of such switches (say a 16 digit keypad), assigning a digital I\/O pin for each key won&#8217;t be a good idea. You need to think about the way to minimize the required number of digital I\/O pins of microcontroller. A very popular method is a keypad matrix where the keys are arranged into rows and columns so that a 4&#215;4 (16) tact switches can be interfaced to a microcontroller using only 4+4 = 8 I\/O pins.<!--more--><\/p>\n<p>This tutorial from PCBHeaven describes the theory behind the operation of a matrix keypad.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/02\/howkeymatricesworks_1277639564.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1762  aligncenter\" title=\"howkeymatricesworks_1277639564\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/02\/howkeymatricesworks_1277639564.gif\" alt=\"\" width=\"344\" height=\"326\" \/><\/a><\/p>\n<div>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td align=\"left\"><script type=\"text\/javascript\">\/\/ <![CDATA[\n     google_ad_client = \"pub-3251335376149574\"; \/* Embedded-Lab_Blog_468x15, created 10\/1\/10 *\/ google_ad_slot = \"5007918417\"; google_ad_width = 468; google_ad_height = 15;\n\/\/ ]]><\/script><\/p>\n<p><script src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\" type=\"text\/javascript\">\n<\/script><\/td>\n<td align=\"left\"><a href=\"http:\/\/pcbheaven.com\/wikipages\/How_Key_Matrices_Works\/\" target=\"_blank\">-&gt;Read More<\/a><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><\/td>\n<td align=\"right\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Tact switches are widely used as digital input devices. Normally one tact switch requires one digital I\/P pin of a microcontroller but if you want to interface a matrix of such switches (say a 16 digit keypad), assigning a digital I\/O pin for each key won&#8217;t be a good idea. You need to think about the way to minimize the required number of digital I\/O pins of microcontroller. A very popular method is a keypad matrix where the keys are arranged into rows and columns so that a 4&#215;4 (16) tact switches can be interfaced to a microcontroller using only<\/p>\n","protected":false},"author":1,"featured_media":1762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,183],"tags":[190,188,189],"class_list":["post-1761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-embedded-lessons","category-tips-and-tricks","tag-decoder","tag-keypad","tag-matrix"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/1761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=1761"}],"version-history":[{"count":4,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/1761\/revisions"}],"predecessor-version":[{"id":5787,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/1761\/revisions\/5787"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/1762"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=1761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=1761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=1761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}