************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I said that I don't understand this kind of data sheet...
Well, I think it says that .....000 only turnes the comp output off, but ....111 turnes the comp off as well. It doesn't matter much for this project, but my first project is battery operated and saving some current is welcome.
I guess it's nice to have a comparator integrated, but right now I would need an OP-amp instead!
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
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.
Last edited by HankMcSpank; - 23rd September 2010 at 16:35.
mikebike, Here is something I thru together last year for quick motor control pwn controller. Try it... The A/D works just fine.. You can get rid of the 64 samples...
Dave Purola,
N8NTA
Bookmarks