As well as implicitly disabling the COMPARATORS, I also disable the VOLTAGE REFERENCE MODULE on the 16F877A...
CMCON=7
CVRCON=0
Those two lines are the ONLY differences between the 'A' and the non-A I've ever included.
You can then progress up to the 18F242/252 (with minor ADC software changes), but there's a HARDWARE difference with the ADC's once you go up to the 18F2420/18F2520 series (eg ADCON1 ADC Configuration %xxxx0100 from the 16F876 can't be pin configured on the 18F2420's).
Bookmarks