??? 09/14/06 11:20 Read: times |
#124286 - I'll try it in other way Responding to: ???'s previous message |
Arvind,
as Russell said above, there is no need for comments like "mov a, p1 ; mov the value of p1 to acc" - we know what the instruction does. You should've written "mov a, p1 ; read state of both columns and rows" or similar. But apparently you still have that strange kind of "programmer's blindness". So, let's play: remove the microcontroller and pretend that YOU are the microcontroller. Connect "yourself" (use a scope or a multimeter or a continuity beeper or similar) to the matrix keyboard's leads, cover the keyboard and ask somebody to press a key without telling you; now try to figure out, which key was pressed. Have fun! Jan Waclawek |