i use 16f872 and adc input A0, ...
I use 4 pin for test 2 row and 2 col,
if i read with 4 pins....i'll be change the pic 16f877 or other 40píns