I am able to read each pin separately without any problems.
This works:
if (portb.2 = 0) Then do something
So does this:
if (portb.3 = 0) Then do something
So does this:
if (portb.4 = 0) Then do something
However, if I check all three immediately after one another, I am getting funny results. Do I need to let portb 'rest' in-between reads, etc? Is there something I am missing?
I have set the registers as per the datasheet for the 16f887:
CM1CON0=%00000000 'disable COMPARATOR 1
CM2CON0=%00000000 'disable COMPARATOR 2
trisb = %11111111 'set all pins to input
Any ideas?
Bookmarks