Thanks Al .. You may be right ...
Well the question is how to set the define adc sampleus parameter in pbp ? I should adjust it according to the decided Fosc ?
Thanks Al .. You may be right ...
Well the question is how to set the define adc sampleus parameter in pbp ? I should adjust it according to the decided Fosc ?
The sampleus parameter is the time given for the acquisition ( changing the sample & hold capacitor). This timing is critical since you must charge the capacitor no more than 1T..(up to 1T the charging curve is quasi linear) Now If you have decided to use fosc = 16 MHz than the minimum pauseus you can get is 5 us so a Define adc_sampleus 15 should give you good results.
Cheers
Al.
Last edited by aratti; - 20th July 2015 at 08:02.
All progress began with an idea
Should we not calculate it 1.6x11 Tad = 17.6 uS ? Thus is it not better to set it to 20 uS ?
The 11 TADs is the time taken by the MCU for the 10 bits convertion! Please do not confuse acquisition with convertion. The setting suggested is the time you will give to the sample & hold capacitor to charge with your input dc value. This time should be enough to charge the cap not beyond the 1T, because beyond this point the charging function is no longer quasi-linear, but totaly logaritmic.
You can set it to 20 us and see If your ADC reading are consistent and adjust this value to suite your need. (Remember that the best acquisition time will depend by the hardware setting, so every circuit has his own best acquisition time)
Cheers
Al.
Last edited by aratti; - 20th July 2015 at 11:22.
All progress began with an idea
Grazie tante per la risposta cara aratti ..![]()
I remember saving a link to this... http://www.edaboard.com/nextoldesttoentry1570.html
page. Be sure to hit the "next" button at the bottom of the page where there is discussion of acquisition time.
hope this helps you.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
I remember saving a link to this... http://www.edaboard.com/nextoldesttoentry1570.html
page. Be sure to hit the "next" button at the bottom of the page to go to Part 2 where there is discussion of acquisition time.
Possibly something of value there.
Last edited by Heckler; - 21st July 2015 at 04:13.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
The only part I cant understand is the line he somehow calculated 40 + 38.4 us = 78.4 uS .. where did that 40 come from ?
Bookmarks