Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Issue successfully resolved

???
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 */


List of 4 messages in thread
TopicAuthorDate
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      

Back to Subject List