Averaging 16 bit values without using 32 bit math


Results 1 to 3 of 3

Threaded View

  1. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    That averaging routine doesn't work so well with LARGE sample sizes.

    Scaling the values up will help some, but it will still suffer on the low end.

    A couple years ago, there was another guy that wanted to average 8,000 samples.
    I wrote the attached program for him, and like normal, never heard from him again.
    Usually that means it worked.

    No guarantees, but you might give it a try...
    <br>
    Attached Files Attached Files
    DT

Similar Threads

  1. Darrel's latest 16 bit averaging routine?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th October 2009, 01:57
  2. Funny PULSIN values: what is going on???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th April 2008, 08:02
  3. 32 bit math
    By fnovau in forum General
    Replies: 4
    Last Post: - 12th February 2008, 23:55
  4. PIC18Fxx math 24 & 32 bit
    By ronsimpson in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd December 2006, 12:52
  5. 32 bit math
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 28th August 2006, 13:34

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts