| ??? 08/03/04 13:49 Read: times Msg Score: +3 +3 Good Answer/Helpful |
#75329 - RE: Keypad Interface confusion Responding to: ???'s previous message |
hi,
The P2 port never scans the columns. It remains at 0XFF ...
const char col_xlat[4]=
{
0xe0, /* column code 1110 */
0xd0, /* column code 1101 */
0xb0, /* column code 1011 */
0x70, /* column code 0111 */
};
void key_scan(void)
{
char col;
char row;
char key;
for(col=0; col<3; col++)
{
P2=P2 | col_xlat[col];
just replace with:
const char col_xlat[4]=
{
0xef, /* column code 11101111 */
0xdf, /* column code 11011111 */
0xbf, /* column code 10111111 */
0x7f, /* column code 01111111 */
};
and:
...
P2=col_xlat[col];
Regards, Oleg |
| Topic | Author | Date |
| Keypad Interface confusion | 01/01/70 00:00 | |
| RE: Keypad Interface confusion | 01/01/70 00:00 | |
| RE: Keypad Interface confusion | 01/01/70 00:00 | |
RE: Keypad Interface confusion | 01/01/70 00:00 |



