I used ADCON1=0b00000110;
which initializes all the multiplexed analog and digital pins as digital pins.
I used MPLAB IDE (Hi Tech C Compiler). It says error when i replace ANSEL and ANSELH with ADCON1. Here is the error message.
Make: The target "C:\Users\Yugal\CDEEE.obj" is out of date.
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\lite\9.60\bin\picc.exe" -C C:\Users\Yugal\Documents\CDEEE.C -q --chip=16F877A -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Warning [176] C:\Users\Yugal\Documents\CDEEE.C; 206.0 missing newline
Warning [361] C:\Users\Yugal\Documents\CDEEE.C; 72.1 function declared implicit int
Warning [361] C:\Users\Yugal\Documents\CDEEE.C; 172.1 function declared implicit int
Warning [337] C:\Users\Yugal\Documents\CDEEE.C; 205.9 line does not have a newline on the end
Error [800] ; 0. undefined symbol "LVP_OFF"
Error [800] ; 0. undefined symbol "MCLRE_ON"
Error [800] ; 0. undefined symbol "BOREN_OFF"
Error [800] ; 0. undefined symbol "PWRTE_ON"
Error [800] ; 0. undefined symbol "WDTE_OFF"
Error [800] ; 0. undefined symbol "FOSC_HS"
********** Build failed! **********
Which compiler You used??