3 Replies Latest reply on Apr 5, 2016 11:46 PM by user_1377889

    Interpretation of values from the DFB as a high pass filter

    aussiesusan

      I am trying to come to grips with the DFB, in this case configured as a high pass filter (or band pass) such that there should be no DC component in the output samples.

         

      I am feeding the DFB with 12-bit unsigned samples from an ADC (via DMA using the alignment features of the DFB). I am using the 'Filter_Read16()' API function to read the result from the holding registers. The output of that function are 'uint16' values.

         

      However I would have thought that a filter that removes the DC component form a signal would then only have the AC component remaining. To me this means that the value should be signed as the filter output can be positive or negative.

         

      Q1) Is that correct?

         

      I see that the documentation states that the return value is "16-bit filter output value represented inb 2's complement".

         

      I suppose I could experiment with this myself but I thought it would be better to get a definitive answer form those 'in the know"!

         

      Q2) Does that mean I can safely save the return value directly as a signed 16-bit integer (in which case the top 4 bits should always be the same; either all 0's for a positive value or all 1's for a negative value)? 

         

      Q2a) If not then what format will the number (and in particular the negative numbers) take?

         

      Susan