Averaging AtoD samples


Results 1 to 40 of 40

Threaded View

  1. #8
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Hey Hank,

    You could try Melanie's number sorting routine. She talks about dumping the upper 4 and bottom 4 numbers. You could do something similar. http://www.picbasic.co.uk/forum/cont...orting-Numbers Something like
    Thanks (as ever) for the input - re Melanie's number sorting code......that's what I was doing in post #14 above - it works, but this weighted average has got me curious now!

    Whichever averaging/sorting method I eventually use will ultimately go into a frequency detect PIC circuit - I use the PIC's onboard comparators...but the sample 'counts' are a little bit erratic ....eg for Kkhz I get a stream of 'counts' in or around 5000 (which is correct for the clock speed)...but then every 10-12 or so readings, in comes a sample that way out of whack - so it's a case of which method to go with to best eliminate that gracefully!
    Last edited by HankMcSpank; - 15th October 2010 at 13:31.

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. ADC Averaging
    By Sach_1979 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st September 2009, 06:53
  3. Atod Digital Filter
    By GeoJoe in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd April 2008, 17:04
  4. Microchip free samples in UK?
    By zoki008 in forum Off Topic
    Replies: 1
    Last Post: - 21st March 2006, 16:06
  5. Averaging & 16 maths
    By paul.mcallister in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd May 2005, 18:17

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