-
How long to sample?
I need to look at the voltage on an ADC port for time t and detect the greatest value that occurs during that time.
My difficulty is that I don't know how long the ADCIN command takes, so I don't know where to start in terms of how many times to look at the pin and at what intervals.
I'm using PBP with a 12F683 at 8 MHz.
-
Well, as to how long the conversion takes ... I posted a table recently that may answer that question ...
http://www.picbasic.co.uk/forum/show...62&postcount=4
But there's also the acquisition time, which depends on the impedance, so it's not a complete answer.
If you know what the impedance is, that can be calculated too.
-
The table helped a lot--thanks!
Impedance of the source is about 20K.
-
20K
Well, that is over the recommended maximum.
But I've found it doesn't matter much ...
According to mister-e's PicMultiCalc, an impedance of 20K would need 19µS acquistion time.
Just a hunch, but I'm thinking more like 30µS.
Testing will tell.
<br>