• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » MSP430FG4618 filter
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • Forums

    MSP430FG4618 filter

    This question is answered
    ASHISH PATEL
    Posted by ASHISH PATEL
    on May 18 2012 08:20 AM
    Prodigy230 points

    i am working with the pulse oximeter i used the filter given by TI only but its not responding well so please give appropriate solution for it

    digital filter code of the TI

    int16_t ir_filter(int16_t sample)
    {
        static int16_t buf[32];
        static int offset = 0;
        int32_t z;
        int i;
                                                //Filter hard above a few Hertz,
                                                //using a symmetric FIR.
                                                //This has benign phase
                                                //characteristics */
        buf[offset] = sample;
        z = mul16(coeffs[11], buf[(offset - 11) & 0x1F]);
        for (i = 0;  i < 11;  i++)
            z += mul16(coeffs[i], buf[(offset - i) & 0x1F] + buf[(offset - 22 + i) & 0x1F]);
        offset = (offset + 1) & 0x1F;
        return  z >> 15;
    }

    filter problem in TI code
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • old_cow_yellow
      Posted by old_cow_yellow
      on May 19 2012 11:31 AM
      Verified Answer
      Verified by ASHISH PATEL
      Guru25715 points

      The code fragment you have shown seems very reasonable. Whether it "responding well" or not depends on the nature of the sample you feed it, the values of the coeffs[], and the correctness of mul16().

      What are the values of coeffs[]? What is the nature of the sample? What do you expect this filter to do? What disappointed you?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • ASHISH PATEL
      Posted by ASHISH PATEL
      on Jun 14 2012 01:02 AM
      Prodigy230 points

      1. values of coeffs[]

      #if 0
      static const int16_t coeffs[9] =
      {
          5225,
          5175,
          7255,
          9453,
          11595,
          13507,
          15016,
          15983,
          16315
      };
      #else
      static const int16_t coeffs[12] =
      {
          688,
          1283,
          2316,
          3709,
          5439,
          7431,
          9561,
          11666,
          13563,
          15074,
          16047,
          16384
      };
      #endif

      Sir can i use the other from FDA tool of matlab amd also in my signal 50hz strong  noise is there using which coeffs i can remove it

      2.  nature of  sample is nothing but one 12 bit ADC value

      3. I want to filter my signal because i got the signal using RC passive filter but i have to do digital fitlering so i want this filter to remove all frequencies more then 10Hz

      4. using circular method i have done the filter but for the 10Hz cutoff there is so many coeffs generated by the FDA tool of MATLAB . i want minimun number of coeffs for 10hz cutoff low pass filter  can u able to help me

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use