Skip to main content
MAnsa.1
Associate III
Question

Implement oversampling.

HI guys, i am using stm8s003f3.which have 10bit adc but my application count is more than 1024.so i am looking for some sample code of oversampling to reduce my adc step size.

if anyone have any sample or reference plzz do suggest n tell me how to implement it in ssoftware with proper resolution.

Thanks!!!

    This topic has been closed for replies.

    8 replies

    Ozone
    Principal

    Oversampling is mainly helpful for noise reduction/filtering, you hardly get a useful gain in resolution.

    I would consider a 12 or 14 bit external ADC with serial interface, or another MCU.

    > ... but my application count is more than 1024...

    I am not sure what that is supposed to mean.

    You can left-shift the results (i.e. scaling), to get 12 ... 16 bit values.

    While it does not increase resolution, it can be useful to "normalize" values from different input sources for commonly used routines.

    MAnsa.1
    MAnsa.1Author
    Associate III

    so there is no other way to increase resolution internally????

    Ozone
    Principal

    If it's a 10-bit ADC, it is 10 bits.

    It has its characteristc errors that scale up with any calcualtion as well.

    > ...which have 10bit adc but my application count is more than 1024

    Why do you think you need more ?

    I worked on several commercial MCU applications successfully using 8-bit ADCs.

    MAnsa.1
    MAnsa.1Author
    Associate III

    my requirement is 2000 count.

    Cristian Gyorgy
    Associate II

    See AN3137 and you could also take a look at Atmel's application note AVR12: Enhancing ADC resolution by oversampling.

    MAnsa.1
    MAnsa.1Author
    Associate III

    can you please share the link??

    Piranha
    Principal III

    It's AVR121 and you should learn using web search engines!