• AVR Freaks

Oversampling and Decimation

Author
taa
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2013/07/25 15:03:18
  • Location: 0
  • Status: offline
2013/08/08 10:47:04 (permalink)
0

Oversampling and Decimation

Hello all, 
I'd like to know what is the limitation of oversampling in terms of using the over sampled value. 
I am using DSPIC30F5011, I want to achieve 16-bit resolution from 12-bit. 
I know that I have to sum 4^n (where n is number of extra bit resolution). So for 13-bit resolution from 12-bit I should sum 4 12-bit values and right shift by n ;
- Therefore in my case 4^4 = 256, lets say that I am sampling a 5Vref pin, this is 4095 in terms of 12-bit. ( 5V/4095 = 1.22mV ) in my case.
- So, sum of 256 values (@ 5V ) of 12-bit is 1048320, right shift by 4, is equal to 65520 ( 1111 1111 1111 0000 ) { 2^16 = 65520 }
- My question is after I over sample will I have any problems storing or using this result in my 12-bit ADC PIC ? Any data size restriction? 
 
#1

5 Replies Related Threads

    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oversampling and Decimation 2013/08/08 11:47:51 (permalink)
    0
    Hmm, no, should be doable. You'll use 16bits C datatype, I'd say.

    GENOVA :D :D ! GODO
    #2
    taa
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2013/07/25 15:03:18
    • Location: 0
    • Status: offline
    Re:Oversampling and Decimation 2013/08/08 12:39:46 (permalink)
    +2 (1)
    Thank you Dario for your quick response. 
    I will go on with my plan. Smile
    #3
    simong123
    Lab Member No. 003
    • Total Posts : 1306
    • Reward points : 0
    • Joined: 2012/02/07 18:21:03
    • Location: Future Gadget Lab (UK Branch)
    • Status: offline
    Re:Oversampling and Decimation 2013/08/10 19:04:30 (permalink)
    0
    Just checking, and for the benifit of anyone dropping by, but you do realise that you must have >0.5 LSB (~1mV at 12bit) of random (pref thermal) noise at the ADC input for this to work ?
    (I know that we are talking about a PIC ADC here, acheiving 0.5LSB noise is an impossible taskwink)
    #4
    MBedder
    Circuit breaker
    • Total Posts : 6773
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re:Oversampling and Decimation 2013/08/10 23:42:55 (permalink)
    +2 (1)
    The chip itself produces this noise intrinsically, so oversampling and decimation works just perfectly. I use it widely and get the 16 bit resolution easily (do not mix with accuracy which stays intact).
    #5
    taa
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2013/07/25 15:03:18
    • Location: 0
    • Status: offline
    Re:Oversampling and Decimation 2013/08/13 16:24:34 (permalink)
    0
    simong123

    Just checking, and for the benifit of anyone dropping by, but you do realise that you must have >0.5 LSB (~1mV at 12bit) of random (pref thermal) noise at the ADC input for this to work ?
    (I know that we are talking about a PIC ADC here, acheiving 0.5LSB noise is an impossible taskwink)

     
    Yes. I have the noise needed to trigger the LSB. It was just a doubt that I had because a friend mentioned it would not be possible and I wanted to make sure. But, i've got enough noise. 
    thx.
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5