MikroElektronika Keypad 4×4 Additional Board User Manual

June 5, 2024
MikroElektronika

Mikro elektronica

MikroElektronika Keypad 4×4 Additional Board

MikroElektronika-Keypad-4x4-Additional-Board

All Mikroelektronika’s development systems feature a large number of peripheral modules expanding microcontroller’s range of application and making the process of program testing easier. In addition to these modules, it is also possible to use numerous additional modules linked to the development system through the I/O port connectors. Some of these additional modules can operate as stand-alone devices without being connected to the microcontroller.

Keypad 4×4

Keypad 4×4 is used for loading numerics into the microcontroller. It consists of 16 buttons arranged in a form of an array containig four lines and four columns. It is connected to the development system by regular IDC 10 female connector plugged in some development system’s port.

The keyboard is usually used as follows:

  1. Four microcontroller’s pins should be defined as outputs, and other four pins should be defined as inputs. In order the keypad to work properly, pull-down resistors should be placed on the microcontroller’s input pins, thus defining logic state when no button is pressed.
  2. Then, the output pins are set to logic one (1) and input pins’ logic state is read. By pressing any button, a logic one (1) will appear on some input pin.MikroElektronika-Keypad-4x4-Additional-Board-1
  3. By combining zeros and ones on the output pins, it is determined which button is pressed.MikroElektronika-Keypad-4x4-Additional-Board-2

A far easier way to load data by using keypad 4×4 is by employing ready-to-use funtions provided in the Keypad Library of any Mikroelektronika’s compiler. On the following pages there are three simple examples written for PIC16F887 microcontrolller in mikroC, mikroBasic and mikroPascal programming languages. In all cases, the number loaded via keypad is converted into the equivalent ASCII code (0…9, A…F) and then it is displayed in the second line of LCD display. In this case, pull-down resistors are placed on output pins RD0 – RD3 and are used to determine logic zero (0) in idle state.

Keypad 4×4

MikroElektronika-Keypad-4x4-Additional-
Board-3

Example 1: Program written in mikroC PRO for PICMikroElektronika-Keypad-
4x4-Additional-Board-4

Example 2: Program written in mikroBasic PRO for PICMikroElektronika-
Keypad-4x4-Additional-Board-5

Example 3: Program written in mikroPascal PRO for PICMikroElektronika-
Keypad-4x4-Additional-Board-6

  • If you want to learn more about our products, please visit our website at www.mikroe.com
  • If you are experiencing some problems with any of our products or just need additional information, please place www.mikroe.com/en/support
  • If you have any questions, comments or business proposals, do not hesitate to contact us at offi[email protected]

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

MikroElektronika User Manuals

Related Manuals