Interfacing hex keypad to 8051 This article is about interfacing
a hex key pad to 8051 microcontroller. A clear knowledge on
interfacing hex key pad to 8051 is very essential while
designing embedded system projects which requires character or
numeric input or both. For example projects like digital code
lock, numeric calculator etc. Before going to the interfacing in
detail, let’s have a look at the hex keypad. Hex key pad is
essentially a collection of 16 keys arranged in the form of a
4×4 matrix. Hex key pad usually have keys representing numerics
0 to 9 and characters A to F. The simplified diagram of a
typical hex key pad is shown in the figure below. The hex keypad
has 8 communication lines namely R1, R2, R3, R4, C1, C2, C3 and
C4. R1 to R4 represents the four rows and C1 to C4 represents
the four columns. When a particular key is pressed the
corresponding row and column to which the terminals of the key
are connected gets shorted. For example if key 1 is pressed row
R1 and column C1 gets shorted and so