Skip to main content
Visitor II
February 10, 2021
Question

Implement oversampling.

  • February 10, 2021
  • 3 replies
  • 2343 views

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.

    3 replies

    Explorer
    February 10, 2021

    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.1Author
    Visitor II
    February 15, 2021

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

    Explorer
    February 15, 2021

    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.1Author
    Visitor II
    February 16, 2021

    my requirement is 2000 count.

    Visitor II
    February 16, 2021

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

    MAnsa.1Author
    Visitor II
    February 17, 2021

    can you please share the link??

    Graduate II
    February 17, 2021

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