Hi Savnik,

RA4 can be used as analog input as data sheet says (16F88).

In this case, you need to add ANSEL = %00010000 to your code.
ANSEL = %00010000 will set RA4 as analog and all others as digital.
Make sure you set RA4 as an input pin prior to ANSEL.


You may need to work around CMCON a little.


------------------------