Keypad Details

The keypad on the MB5 is accessed by reading a byte from location $500001. It has been wired to be an interrupt-driven device. Whenever a key on the keypad is pressed, a level 1 autovector interrupt is generated. The level 1 autovector interrupt vector has been set to start execution at location $100000. This is the location at which a JMP instruction must be placed that points to the interrupt handler. .lp

The keypad generates a 4-bit value ($0-$F) corresponding to the pressed key. This value is read as a byte from location $500001. It is best to mask out the higher order 4 bits of the byte before using the value. The mapping of values to the labels on the keypad may not be what one would expect. The table on the left shows the keys of the keypad. The table on the right is the value that is returned when the key is pressed.

Keyboard Codes
Keypad
123A
456B
789C
*0#D
Key Codes
0123
4567
89AB
CDEF

Instructor Revision 1.1 (2003/11/21 21:12:59)