How fast is enough? Do you detect some specific range/values, or just a threshold/single value?
How fast is enough? Do you detect some specific range/values, or just a threshold/single value?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, Andrew
Such use of ADCs are explained in the PIC Datasheets relevant chapters and Midrange Manual.
Good explanation also from the great " Bigonoff " ( a good asm teacher from Belgium ) - in French !
see Part 2 $19.6 ...
Alain
************************************************** ***********************
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 " !!!
*****************************************
You didn't search too much ...
23.7.1 Faster Conversion - Lower Resolution Trade-off
Alain
************************************************** ***********************
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 " !!!
*****************************************
Or perhaps not looking in the right place. It doesn't refer to it in the device datasheet but does in the midrange manual.
It's a pity you can't just stop the conversion after a certain number of bits.
Anyway, thanks for pointing me in the right direction.
Andrew
aha ???
from the 16F87xa Datasheet ...To calculate the minimum acquisition time, TACQ, see
the PICmicro® Mid-Range MCU Family Reference
Manual (DS33023).
LOL ... Everything always in the Holy Datasheet plus PbP Manual ...
Ok, lots of reading ... but always useful !!!
Alain
************************************************** ***********************
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 " !!!
*****************************************
Application is to detect a change in light intensity caused by an object passing in front of a confocally illuminated machine vision lens. It is battery powered so I want a low duty cycle illumination but fast enough to detect moving subjects.
What i'm thinking is a cycle that runs:
1) Light on
2) Pause enough for sampling cap to charge
3) Start AD conversion
4) Light off
5) Interrupt on conversion complete and compare new intensity to old - GOTO event handler if significant change
6) Pause and loop
What I want is a total loop time of <1msec or less. I can run a TAD of 2usec so it would only be 22usec for the conversion which to be honest is probably way fast enough. It just seems wasteful to do a 10bit conversion when I only want 4 bits of data !
Andrew
Bookmarks