Quote Originally Posted by alexx_57 View Post
y add the line CMCON1=7 to convert analog inputs to digital
The 877A does not have a register named CMCON1 - try

ADCON1 = 7

Post your code - otherwise we just have to guess