Re: A89: STron89(not quite as long... :)... )


[Prev][Next][Index][Thread]

Re: A89: STron89(not quite as long... :)... )




In a message dated 98-12-10 01:31:47 EST, you write:

<< To answer your question, when you read from directly from the keyboard you
 are reading from the ports rather than from an address updated by interrupt
 routine that reads from the keypad port.  To work it, you must put a bitmask
 out the port containing the row of your key (look at the keyboard matrix
 doc), then after a short wait read back from the port and the bit set (maybe
 the bit not set?) will be the column of the matrix.  I haven't tried this on
 the 89 so I might not be completely accurate, but that's the idea.
 A key is held down if you test the key using the port again and it's still
 pressed.  The way of seeing if it was just pressed (because a simple light
 keypress will appear held down for many loops) is to set up a timer, a delay
 or to check if the key was released.
  >>


So, it is then much more efficient to read the keys directly from the keyboard
than the address that is updated by the interrupt?