Thanks guys i have solved the problem by implementing ADCON1 configuration.
But the question is why ADCON1 is necessary for the pins to work correctly , ADCON1 only got 3 programmable bits .
and by using 0x07 as ADCON1 value we are assigning value 1 to 3 bits that have no use on that register , only usable ones are the ones bellow and are all set to 0 i dont see how this register could affect the pins operations :
ADFM - A/D Result Format Select bit
1 - Conversion result is right justified. Six most significant bits of the ADRESH are not
used.
0 - Conversion result is left justified. Six least significant bits of the ADRESL are not
used.
VCFG1 - Voltage Reference bitselects negative voltage reference source needed for the
operation of A/D converter.
1 - Negative voltage reference is applied to the Vref- pin.
0 - Power supply voltage Vss is used as negative voltage reference source.
VCFG0 - Voltage Reference bitselects positive voltage reference source needed for the
operation of A/D converter.
1 - Positive voltage reference is applied to the Vref+ pin.
0 - Power supply voltage Vdd is used as positive voltage reference source.