9 Replies Latest reply on Sep 26, 2017 2:36 AM by user_51122829

    Need help on AN66444

    user_51122829

      I am trying to implement application note AN66444 in my project that require an accurate voltmeter.

         

      Following is the code segment from main.c downloaded with AN66444:-

         

           { ...................

         

          /*perform CDS*/
              iVcds = iVout1 - iVout2;
              
              /* IIR Filter*/
              iVcds_curr = iVcds;
              iVcds_acc += (iVcds_curr - iVcds_acc) >> 4;
              }
          
          /*Display output in desired format on UART*/
          fVcds = ADC_DelSig_1_CountsTo_Volts(iVout1);
          UART_1_PutChar('\r');
          UART_1_PutChar('\n');
          sprintf(caVcds_decimal_str,"%f",(float)fVcds);
          UART_1_PutString((uint8*)caVcds_decimal_str);

         

      The display routine is displaying "iVout1".

         

      I could not find any link between the "IIR routine" and the "display routine".

         

      Would greatly appreciate if someone can help me on how the IIR Filter is being used here ?