free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
Freddy
Tue Oct 07 2008, 08:06AM

 User Offline
Registered Member #9399
Joined: Mon Jul 28 2008, 10:01PM

Posts: 37
Thanked 0 times in 0 posts
Hi there,

the other day I built a temperature sensor using AT89S51 and ADC0844, but then the temperature display fluctuating result (about a certain value). Because, I took each reading (from ADC) and then displays it. I thought this is the hardware problem i.e. lack of signal conditioning circuitry or etc.

Then, I got this idea from my lecturer to do averaging.

So, what I did was took 255 readings, sum them up and divide by 255. The result then is displayed. Now, the result is steady and not fluctuating.

Note that to sum up 255 8-bits data would produce 16-bit result. So, this require 16-bit addition operation for the 8051.

I also used 16-bit division to divide the sum by 255d (FFh) to get the average.

Just my 2 cents





Build target 'Target 1''
linking...
Program Size: data=8.0 xdata=0 code=709
creating hex file from "Final Year Project"...
"Final Year Project" - 0 Error(s), 0 Warning(s).
Back to top


shyam
Tue Oct 07 2008, 08:18AM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 723
Thanked 107 times in 103 posts
hi freddy!!!

gr8 thinking...
also refer

http://www.8051projects.net/forum-t7667-post.html
http://www.8051projects.net/lofiversion/t5070/c8051-adc-in-c--programming.html

lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top


 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems