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

Rickey's World :: Discussion Forums :: Discuss and Learn :: 8051 Discussion Forum
 
<< Previous thread | Next thread >>
MOVING AVERAGE FILTER
Moderators: Ajay Bhargav, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph, ExperimenterUK, DavesGarage
Author Post
indigo_rei
Fri May 29 2009, 08:42AM
 User Offline
Registered Member #9664
Joined: Fri Aug 08 2008, 06:27AM

Posts: 4
Thanked 0 times in 0 posts
Hi guys, I really need a reference from book or web to coding Moving Average Filter in 89s51 . I tried to find many other places. Please send me the file or the download link. thank you very much.

Back to top

DavesGarage
Fri May 29 2009, 01:50PM

 User Offline
Registered Member #14254
Joined: Tue Jan 20 2009, 08:14AM

Posts: 620
Thanked 116 times in 112 posts
In situations like this, Google can be your friend.

If you type "moving average filter" into Google, you will find many references to this technique.

Here are a couple for you to investigate and read:

http://en.wikipedia.org/wiki/Finite_impulse_response
http://en.wikipedia.org/wiki/Filter_(signal_processing)
http://en.wikipedia.org/wiki/Signal_processing

I hope this helps you,


-Dave
"Basic research is what I am doing when I don't know what I am doing"
Back to top

indigo_rei
Sat May 30 2009, 07:14PM
 User Offline
Registered Member #9664
Joined: Fri Aug 08 2008, 06:27AM

Posts: 4
Thanked 0 times in 0 posts
thanks for your help dave, but wikipedia just a theory. I need a real implementation on 89S51. Could someone help me ?
Back to top

Ajay Bhargav
Tue Jun 02 2009, 07:47AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 7484
Thanked 1324 times in 1248 posts
I believe 8051 is small for complex calculations, its better to go for faster MCUs or a DSP.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

DavesGarage
Tue Jun 02 2009, 12:53PM

 User Offline
Registered Member #14254
Joined: Tue Jan 20 2009, 08:14AM

Posts: 620
Thanked 116 times in 112 posts
There are many different "types" of filters you can write, and the boxcar (or moving average, as you called it) or rectangular filter is only just one of 'em.

Here is a comparison of a variety of filters, and the kind of effect they can have on your data, as a function of frequency...




to make a simple "moving average" filter, you merely need to add up the data, then divide by the number of data elements.

If you add all the elements every time you calculate the average, it will cost you n additions plus one division.

On the other hand, if you keep track of where the oldest data is located, then as the data progresses, you merely add the new data, subtract the oldest data, and do the division again...

This method only costs you a single addition, a single subtraction, and a division. Much faster...

I won't write the code for you. I hope this helps, though...


-Dave
"Basic research is what I am doing when I don't know what I am doing"
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