how to stabilize the lcd display reading???

Status
Not open for further replies.

oh...im scratching my head....how i gonna put in together with my code??hehee
 
hi,
Using those increments is simply a case of the number of Right Shifts to be used to get the average of the sample size.

eg: if new absolute value is different by 40% of the old value, use 8 samples to form the new average sum, then right shift this value by 3
 

im noob....im still dun get it....haizz....
 
I'll see if I can find you some Hi-hech C code on averaging

Some thing like this I didn't try it the coding may be wrong but I think it close

Code:
ADC_old=ADRESH;
ADC_new=ADRESH;
   switch (ADC_new)
		 (
		 case 10:
			ADC_new=ADRESH;
			   if ADC_new + ADC_old << 8; 
				i=8;
			ADC_old=ADC_new;
		)
	for (i=i;>=0; i=-1 
		ADC_new=ADRESH+ADRESH;
		)

You'll need 4 or 5 case statements
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…