internetuser2k11
Banned
I've connected a 4X1 keypad to pic16f877a and enabled the internal pullups.
But the keypad refuses to work. If I make the keypad 4X3 or 4X4 it works without any problem. What might be the problem? Should I disable Comparators? If yes what is the Command to disable it, like CMCON = 0... Also want to set PORTB and PORTD as digital I/O. What is the command for it. I am using porta pins for adc measurement.
my settings are
ADCON0 = 0b00001111;
ADCON1 = 0b00000000;
CMCON = 0;
TRISC = 0b00000000;
TRISA = 0b00001111;
TRISB = 0b11111111;
TRISD = 0b00000000;
OPTION_REG.B7 = 0;
But the keypad refuses to work. If I make the keypad 4X3 or 4X4 it works without any problem. What might be the problem? Should I disable Comparators? If yes what is the Command to disable it, like CMCON = 0... Also want to set PORTB and PORTD as digital I/O. What is the command for it. I am using porta pins for adc measurement.
my settings are
ADCON0 = 0b00001111;
ADCON1 = 0b00000000;
CMCON = 0;
TRISC = 0b00000000;
TRISA = 0b00001111;
TRISB = 0b11111111;
TRISD = 0b00000000;
OPTION_REG.B7 = 0;