Your column 5 doesn't work simply because PortA.4 is a Schmitt Trigger
input and an open drain output. You will need an additional NPN transistor with a pull down resistor to make column 5 working.
Cheers
Al.
PS adding CMCON = 7 on top of your code, will disable the comparators function.
Bookmarks