Page 312 - ARM Based Microcontroller Projects Using MBED
P. 312
298 10. USING LIQUID CRYSTAL DISPLAYS (LCDs)
named as P0, P1, P2, and P3. Notice that 100ohm resistors are connected in series with every
row and column of the keypad.
The keypad is connected to the following PORTC pins of the development board:
Keypad Pin PORTC Pin
P4 PC_6
P5 PC_7
P6 PC_8
P7 PC_9
P0 PC_10
P1 PC_11
P2 PC_12
P3 PC_13
Fig. 10.19 shows the circuit diagram of the project. The LCD is connected to PORTC of the
development board as in the previous project.
10.5.5 The PDL
Fig. 10.20 shows the program PDL.
10.5.6 Program Listing
The program uses the keypad library developed by Yoong Hor Meng (Copyright, 2012).
This library can be installed into the program by right clicking on the project folder (Calc)
and then selecting Import Library… From Import Wizard, and double clicking on the keypad
library with description Libreria Teclado 4×4. The keypad library is interrupt driven and
was developed for 4 4 keypads. Therefore, pressing a key on the keypad generates an
FIG. 10.19 Circuit diagram of the project.