Skip to content
Sizwe edited this page Jun 3, 2018 · 2 revisions

The Keypad

Figure above shows the 4x4 Matrix keypad layout,and Pin connections

The 4x4 Matrix keypad is amongst the widely used control device for entering data, it is comprised of 16 keys/buttons connected via rows and columns: has no other internal circuitry, only the wires connecting the keys; seen on the figure above.

Tasks (done by the keypad):

• The shopper will use the keypad, when entering the password. Connection Approach

Connection:

  1. Attach matrix 8-pin interface to the 8 GPIO pins.

  2. Setup column pins as outputs and set to high.

  3. Setup row pins as inputs with pull-up resistors (inputs are set high).

  4. Set outputs low, ones at a time.

  5. When a key is pressed, input becomes low indicating which key has been pressed (Since we now know which column is set low; one column is low at a time).

  6. Implement a short 2µs time delay in between key presses; this avoids the double key press problem (within the program code).

Clone this wiki locally