3 Replies Latest reply on Feb 1, 2013 1:11 AM by userc_38487

    Filter Code Problem



      I am using a filter in PSOC 5, but I am unable to run/build it (i am not using a DMA).




      the console says 'undefined reference to `Filter_Write24''










      where ADC_sampleValue is a 32 bit uint, and Filter_CHANNEL_A is a uint8 type(how to set this?, ive only declared the variable as a uint8 type), and i have included the following header files:


      #include <device.h>


      #include "stdio.h"


      #include "stdlib.h"

        • 1. Re: Filter Code Problem

          Should -








          be typed as -








          Each time you place a module it's name is generated, and unless you edit the


          name, all its API's are given that name in their given name.




          Regards, Dana.

          • 2. Re: Filter Code Problem

            Note this includes auto generated constants, check to see if the "Filter_CHANNEL_A" in








            should be typed as








            You would check the .h applicable file.




            Regards, Dana.

            • 3. Re: Filter Code Problem

               Remember the explanation for second parameter of Filter_Write24() API - "Value to be written to the input register represented in 2’s complement".




              If you are transferring 20 bit single ended ADC data, then you need to modify. If it is a differential ADC data, then no problem.