Thanks Bruce
What if I use the 16F876a version ?
The A version has comparators so then you would use CMCON = 7. Even though it defaults to this value at POR, it's good to include this so you remember. Some PIC types with comparators don't default to disabled.
A/D looks pretty much the same.
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).
Last edited by Melanie; - 10th March 2010 at 18:59.
Thanks,
What about ADCON0 ?
do I have to set the clock for the ADC ?
It really would help folks, help you, if you included a tad more information.
If you're using ADCIN, then it normally handles ADCON0 for you. If you plan on doing it all
manually, then for sure you need to setup everything yourself. Including ADCON0.
Bookmarks