Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to stabilize the lcd display reading???

Status
Not open for further replies.
Haow all you need to to do is some thing like this

If oldTemp less then newTemp by 10% count = 64 and loop 64 times and divide that for update of LCD

If oldTemp less then newTemp by 20% count = 32 and loop 32 times and divide that for update of LCD

If oldTemp less then newTemp by 30% count = 16 and loop 16 times and divide that for u date of LCD

If oldTemp less then newTemp by 40% count = 8 and loop 8 times and divide that for update of LCD

Some thing on that oder would work

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
 
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top