Enhancing ADC resolution

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In AVR121 document Enhancing ADC resolution by over sampling describes a technique that applies artificial noise in the signal or the reference pin that affects only 1-2 LSB in the signal.I wonder if is possible to do this by software,i wrote some code for 14 bit resolution that seems at a glance that works.

double sum;

TCCR1A=0x00;
TCCR1B=1<<0;//fclk
TCNT1H=0x00;
TCNT1L=0x00;//from 0 to 0xFFFF

void main(void){
float i;
int z;
short remainder;

while(1){
sum=0;
for(z=0;z<=255;z++){
sum+=read_adc(0)|(TCNT1&0X03);
}
remainder=sum%16;
if(remainder>=0x08){
sum+=1;
}
sum/=16;
i=((sum*5)/16384);
}
}

if anyone interests try it and tell the results

Last Edited: Mon. Sep 28, 2009 - 10:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry, that is not going to work. The noise must be applied to the signal, then the signal measured. Adding noise to the measurement itself will do nothing.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Koshchi wrote:
Sorry, that is not going to work. The noise must be applied to the signal, then the signal measured. Adding noise to the measurement itself will do nothing.

Doesn't it have to also be out-of-band noise as well that
is applied?