Well, I'm intrigued. This has also raised some questions as to my ability to read a data sheet...
Going back to Table 17-1 in the datasheet. MC refers to "TAD vs. DEVICE OPERATING FREQUENCY". In this case I assume "DEVICE" to be the IC. If this is the case then with ADCS2:ADCS0 set to "111" then the max you can clock the part at is 1 MHz. Am I missing something here?
In ADCON2 you have ACQT2:ACQT0 set to "000" = 0TAD. Is this correct? I'd have a look at section "17.3 Selecting and Configuring Automatic Acquisition Time"
There is are two notes regarding using Frc as the clock and putting the part to SLEEP before starting a conversion. There was the note about the accuracy may be off if not put to sleep but unclear to me what happens if you don't.
When you say it's not working, what exactly do you mean? The result is wrong, or there is no conversion at all? You may already do these things, but when I'm testing a section of code I'll do things like blink an led after a conversion and such just to make sure that the routine is even running...
What is the source impedance? Max is 2.5K...
I agree with Al in the way that he handles the Go/Done bits and not use the defines...
Lastly; what versions of PBP and MPLAB are you using? I recently was having a problem with a program and knew the program was correct but wouldn't run. For giggles I upgraded both PBP 2.60A and MPLAB to the latest and low and behold it started working. I wish I hadn't done them both at the same time so I knew which one it was (frankly I don't care) but it solved the problem.
Bookmarks