how to get analog-to-digital conversion accuracy??.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

how to get analog-to-digital conversion accuracy??.

3,880 次查看
quimey
Contributor I
hello I have a problem in mi ad input : to to to much noise.
I have a potentiometer  of 10k and the noise is 100 to 200 mvolt.
Some know the AN1056?
You me can send it?
Can someone help me?
i´d like to do a Algorithm for reduce the noise for software,do you know someone?
I am using C language
tank you sorri for my inglish.
标签 (1)
0 项奖励
回复
9 回复数

1,420 次查看
celsoken
Contributor V
Dear Quimey,

I don't have enough data to help you but you probably could implement a simple software low-pass filter by averaging the results.

You can implement it by taking n samples, adding n/2 to the result and after dividing the result by n. If both n and the sampling interval is adequate, the results can be ok.

Cheers,

Celso
0 项奖励
回复

1,420 次查看
denny_george
Contributor I
Dear Quimey,
How come you came to know that there is a noise of 100-200mV ? CRO ???
 
Read Channel BandGap ADC value .It is +/- 1, 2 counts from the eqn I said before.
 
Anything extra ADC value on the Channel BandGap could be considered as white noise.
 
Similarly you can Read Channel Vrefh= max value and Channel Vrefl= 0x000. I would suggest the Bandgap thing or Channel Vrefl= 0x000.


Message Edited by Geo*** on 2009-01-15 01:51 PM
0 项奖励
回复

1,420 次查看
quimey
Contributor I
I  saw this in a osciloscope ,the maximun and minimun value of the reference was for example 680mv and 300mv,wat is bandgap?
0 项奖励
回复

1,420 次查看
denny_george
Contributor I
Hello Quimey,
 
Bandgap voltage is the refence voltage( =1.2 V) normally used calibrate the ADC and may be other voltage handling circuits (may be used outside MCU).Ok I see you don't have Bangap voltage cahannel in your MCU.
 
I assume you are using  MC68HC908MR ( I caouldnot find HCS core version of MR family)
 
I see you have you have pins VREFH and VREFL popping out .What are its voltage levels ? Is it tied to analog VDD and VSS ?
 
You said " the mcu family y mr and the resolutios is 10 bit but y has truncated to 8 bit "
 
I guess you might have set the ADC reg for 8-bit truncation mode
 
Can you send the ADC driver code.Someone can give a look
 
 


Message Edited by Geo*** on 2009-01-16 05:51 AM
0 项奖励
回复

1,420 次查看
quimey
Contributor I
ok, this is the code:
void init_adc(void){
 
ADSCR_ADCO=1;/*CONVERSION continua*/
ADSCR_ADCH0=1;/*ELIJO ATD1 PIN 63*/
ADSCR_ADCH1=0;
ADSCR_ADCH2=0;
ADSCR_ADCH3=0;
ADSCR_ADCH4=0;
ADCLK_ADIV2=1;/*ELIJO EL PRESCALER EN 8 PARA TENER APROX 0,5MHZ DE CLOCK DE ADC*/
ADCLK_ADIV1=0;/*8,9MHZ CRISTAL*/
ADCLK_ADIV0=0;
ADCLK_MODE1=0;/*ELIJO TRUNCAR A 8 BIT*/
ADCLK_MODE0=0;
ADSCR_AIEN=1;
}
regards
Thank you for your help
quimey
0 项奖励
回复

1,420 次查看
Lundin
Senior Contributor IV
Are you feeding the ADC with a separate reference voltage or with the regular supply voltage?
0 项奖励
回复

1,420 次查看
quimey
Contributor I
with the regular supply voltage way?
0 项奖励
回复

1,420 次查看
denny_george
Contributor I


how to get analog-to-digital conversion accuracy??.


Step1: Read Bandgap Buffer value ( Bandgap Buffer Enable= TRUE ;-)  ok)
Step 2:  Bandgap Buffer value (in hex)  corresponds to voltage 1.2 V (See Bandgap Voltage Reference in DC Characteristics (appendix part of datasheet.)
 
 
If ADC Resolution is n bit ==> ADC( Bandgap) value in REG= ( 1.2 / 5 ) * 2^n , then the analog-to-digital conversion accuracy is quite good.
 
 
 
You have not mentioned the MCU family name and ADC resolution.




Message Edited by Geo*** on 2009-01-15 12:06 PM
0 项奖励
回复

1,420 次查看
quimey
Contributor I
the mcu family y mr and the resolutios is 10 bit but y has truncated to 8 bit
0 项奖励
回复