??? 09/15/06 17:05 Read: times |
#124356 - The Algorithm Responding to: ???'s previous message |
Bring the rows low 1 at a time.
Read the columns Back ---CCCC ---1234 R1-00X0 R2-0000 R3-0000 R4-0000 EX P1 7,6,5,4,3,2,1,0 = R4,R3,R2,R1,C4,C3,C2,C1 P1 = 07Fh // Set Row 1 low if Low nible of P1 =0Fh // no key pressed else some thing is. in this example 02h for a scan code of 082h Note if you did not use a diode matrix, you can get ghost keys. This is when 2 keys are pressed at the same time. The scan may indicate a key is press when it is not. |