2014-07-07 12:30 PM
hello dear forum,
By using a method called ‘Oversampling andDecimation’ higher resolution might be achieved, without using an external ADC.I have read this above sentence in an application note for increasing the ADC resolutionfor an 2 bit increase in ADC resolution for example it suggests 4*4 samples added togetherand then the result is right shifted 2 bits and the ADC resolution is improved for example from 10 bit to 12 bits my question is following I want capture the duty of a 100 KHz square wave for example if duty is 50% the capture value with 72 Mhz F103 clockis 360if the duty is %40 the capture value becomes 288you see the resolution is very poor ( only 72 count difference )my question is if I use the above technic ( oversampling and decimation for ADC ) for the timer capture values ,do I get the same resolution improvment ?thank you2014-07-07 12:49 PM
Input Capture has a Prescaler (not the time base one), you can measure the duration of up to 8 cycles. Clearly won't help for odd duty cycles.
You can also make the time base more rapid, that would improved the granularity of the measurement. You can also could pulses using an External Counter mode, and sample that periodically. Though it would tend to work better for higher frequencies, where interrupts would saturate the processor. ie 10 MHz should produce 10000 ticks every millisecond.2014-07-07 05:38 PM
my question is if I use the above technic ( oversampling and decimation for ADC ) for the timer capture values ,
do I get the same resolution improvment ? Yes, but
the
16 analog samples can be accumulated in a shorter time using ADCs than taking 16 timer samples of a 100 KHz signal. You have to assess if the duty cycle is sufficiently constant during the sample time using any sampling method, be it oversampling or faster clock times. Cheers, Hal2014-07-08 12:40 AM
I think you are talking about technique similar to equivalent time sampling used in digital scopes.
It's more tricky than oversampling but I think it might work.