??? 02/22/05 10:02 Modified: 02/22/05 10:14 Read: times |
#88130 - Re:Keypad Program Responding to: ???'s previous message |
Hello Dear Raymond
If you continue this program step by step you find that: row0->p0.0 row1->p0.1 row2->p0.2 row3->p0.3 column0->p0.4 column1->p0.5 column2->p0.6 column3->p0.7 For scanning keypad you must generate below sequence 11111110b,11111101b,11111011b,11110111b 0FEH,0FDH,0FBH,0F7H So,you can load 0feh in one register and then rotate it and at most this is 4 times. therefore r3=4,r2=0feh clearly,at first r4=0 that means if pressed key is in first row? r4 is incremented if pressed key is in second row ... finally r4 is 0/1/2/3 and r6 is 0/1/2/3 if key 5 is pressed then r4=1 and r6=1 that means first row & first column DYTA=1*4+1=5 and code 5 is returned from lookup table I Hope it is Useful. Mehdi N.Rahni |
Topic | Author | Date |
Keypad Program | 01/01/70 00:00 | |
Re:Keypad Program | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
re:thanks | 01/01/70 00:00 | |
re:re![]() | 01/01/70 00:00 |