PIC16F887 MCP23017 LCD and Keypad Interfacing using XC8 In this example, the micro-processor keep tracks of keypad scanning. When the a key-press is d