Not sure if you're sorted, but as someone who recently struggled with this very type of same thing, here are the 12F683 commands towards helping you out ...
If using 10 bit AtoD, then right justify is required**.....
ADCON0.7 = 1 (right justifies your 12F683 AtoD result)
.....whereas with 8 bit AtoD, left justify is required....
ADCON0.7 = 0 (left justifies your 12F683 AtoD result)
and finally this one....
CMCON0 = 0 (turns the pesky 12f683 comparator off - of course if you need the PIC's comparator, then it's not pesky at all & this command should not be used!)
Good luck!
** and no matter how many times I read the datasheet with respect to left/right justifying, I end feeling like an amoeba being wafted around the bottom of a refuse tip pond.
Bookmarks