PDA

View Full Version : ADCIN speed?



achilles03
- 3rd February 2006, 16:22
I'm debating on a method to sample an AC voltage between 100 to 400 Hz. I can either rectify it, smooth it, and read it through the ADC (from which I can only get voltage characteristics, which is ok but not desirable). Or I can take several samples in order to determine the frequency as well as the voltage characteristics.

To do this second method, I would need a very fast ADCIN sample rate. What sort of sample rate could I get using ADCIN with a 20Mhz xtal?

Thanks in advance for any advice offered!
Dave

Melanie
- 3rd February 2006, 16:58
It's in the ADC section of the DATASHEET for your chosen PIC.

mister_e
- 3rd February 2006, 20:51
If you have a need for speed... forget ADCIN. Better if you set/read internal register directly.

Will be much faster and produce a tighter code.

mischl
- 19th February 2006, 11:28
i'm sure there is anywhere an example of a fast A/D conversion, but i can't find it... could anyone guide me please? thanks a lot

when i set ADC_SAMPLEUS to 50 (clock = 3, bits = 8), the statement ADCIN 0, an1 needs 136us. clock to 24 (minimum at 4mhz) needs 104us. i'm work on a 12F675