/* main.c */ /* Read from a keypad and display the key pressed */ /* on an 7-segment display */ #pragma SMALL DB OE #include unsigned char SetDisplay(unsigned char value){ unsigned char LookupTable[17] = { 0xC0, ... }; /* use code from previous lab */ /* fill in entries to table to handle A, B, C, D, E, F */ } /* Routine to scan the key pressed */ unsigned char key_scan() { unsigned char i, j, temp1, temp2; while( 1 ) /* keep waiting for a key to be pressed */ for(i=0; i<4; i++) { /* Set each row to 0 */ P1 = 0xff & ~(1<