Quote Originally Posted by sinoteq View Post
Your A.1 in-port is not set as input. You use PortA.1 right?? Look at this:

TRISA=%00000 'This is all A-pins to output == Decimal 0
TRISA=%00001 This makes A.0 an INPUT == Decimal 1
TRISA=%00010' This will make A.1 an INPUT == Decimal 2
TRISA=%11111 'All input== Decimal 31
Doh! Yes, I think I see it now. In my mind I was thinking just assigning dec 1 would make all the registers 1 - a short way of saying %11111111 which is of course not correct.

I get it now. Knew it had to be some silly oversight like that.


Quote Originally Posted by sinoteq View Post
The code is for 16F688 right? Then ANSEL is the way to go and no other way.
Datasheet page 36
M
So then my code on the ANSEL is correct?

Code:
ANSEL = %00000000     'Turn off analog input for ports, set digital I/O
I thought that was pretty self explanatory in the data sheet but I could still have it wrong.

Thank you!