A keypad is a grid of push to make switches labelled with numbers and symbols. Each switch requires two connections to be connected, these are are divided into ROWS & COLUMNS. Rather than having 12 PTM switches that require 12 allocated inputs on a microcontroller a matrix grid is used


In order to connect a keypad to a Genie you require 3 INPUTS for the columns & 4 OUTPUTS for the rows (or vice versa). The outputs act as the Positive and the inputs the Negative on a switch. For example the switch labelled '1' would require the connection to 2 (ROW 1) & 3 (COLUMN 1) to be used

------------------------------------------------------------------------------------------------

The pin layout for the keypad shown is used to connect and program its use with a Genie microcontroller. ROWS should be connected to the POSITIVE pin for each output and the COLUMNS should connect to the NEGATIVE of each input pin. This can be reversed to suit cirucit design. To avoid confusion the row/column numbers should match the input/outputs of the microcontroller


 Systems approach to Designing - Keypad Programming

Genie c20 Keypad Circuit


A/D2 = COLUMN 3     Q1 = ROW 1

A/D3 = COLUMN 1     Q2 = ROW 4

A/D4 = COLUMN 2     Q3 = ROW 3

Q0 = LCD                     Q4 = ROW 2

​Q6 = RED LED             Q7 = GREEN LED


Each key press is checked by making the output pin for each row HIGH and checking for a INPUT pin signal on each column. When found the respective number is added to the Variable A. This number is stored using the swap command and erased. The cycle repeats 4 times to store 4 variables. Each is checked against the code (2687) to determine access as a green LED 

​​​​​​Mr BILLINGTON

Copyright © A.F.Billington 2018. All rights reserved.