??? 08/03/04 13:38 Read: times |
#75328 - Keypad Interface confusion |
I have attempted to iron out the kinks in the keypad interface referenced on this site for a couple of weeks and because of mental block cannot discover the problem. The P2 port never scans the columns. It remains at 0XFF and row = 0 after the exclusive OR. What am I missing? Here is some of the code. The full version is referenced at forum/phtml?id=31164.
void key_scan(void) { char col; char row; char key; for(col=0; col<3; col++) { P2=P2 | col_xlat[col]; row=P2; /* fetch in the row data */ row=(row & 0x0f)^0x0f;/* keep low bits and invert */ if(row != 0) /* if a row bit then some key */ |
Topic | Author | Date |
Keypad Interface confusion | 01/01/70 00:00 | |
RE: Keypad Interface confusion | 01/01/70 00:00 | |
RE: Keypad Interface confusion | 01/01/70 00:00 | |
RE: Keypad Interface confusion![]() | 01/01/70 00:00 |