Atod Digital Filter


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Have you tried putting a capacitor from the ADC in pin to ground? 22uf or larger. Might be easier than doing it in software.

    Then after that do an average routine.

    ADC_AVG = ADC_AVG + ADCIN
    maybe five times in a for/next loop. Then divide ADC_AVG by five.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Schematic and the WHOLE code would help.

    and this one...
    Code:
    CURRENT1 = CURRENT1 - CURRENT1 >> 6
    not sure how it will be processed...
    Code:
    CURRENT1 = CURRENT1 - (CURRENT1 >> 6)
    could be better.

    What's the initial value of CURRENT1?

    Darrel did some nice average routine, maybe you want to have a look at it?
    http://www.pbpgroup.com/modules/wfse...hp?articleid=7
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2006
    Location
    Arvada Colorado
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Thanks

    CURRENT1 = CURRENT1 - CURRENT1 >> 6
    Works great. Seems so clear now.

Similar Threads

  1. Average Values and digital filter ...
    By jorge in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 24th April 2010, 13:29
  2. 2nd Order Digital Filter for 24-bit
    By sefayil in forum mel PIC BASIC
    Replies: 0
    Last Post: - 2nd December 2005, 22:55
  3. digital filter
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th September 2004, 02:28
  4. implementig digital filter and my problems????????
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd June 2004, 19:06
  5. digital filter with pic16f877
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th April 2004, 04:51

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