On Mon, Mar 30, 2009 at 09:58:53AM +0000, feldmaus wrote:
> feldmaus <feldmann_markus <at> gmx.de> writes:
> 
> > Is there any example which corrects the dc offset ?
> > So that we see, which commands are up to date.
> 
> I think we have first to calculate the dc offset?
> And the to adjust ?
> 
> To calculate the dc offset we can use:
> usrp_cal_dc_offset:
> usage: usrp_cal_dc_offset [-v] [-w which_side] [-D decim] [-c ddc_freq] [-g 
> gain]
>   [-S fusb_block_size] [-N fusb_nblocks]
> 
> And get for example this:
>   1715545 :    172                2597454 :    260
> 
> Which is side A and which one is side B ?
> The '-w' parameter doesn't change anything, so how to use this correctly ?
> 
> To adjust the dc offset we can use:
> set_dc_offset_cl_enable(self, int bits, int mask)
>        OR
> set_adc_offset(self, int which_adc, int offset)
> 
> Can somebody please explain the different between these both functions ?
> Which one should we use to adjust the offset ?
> 
> Regards Markus


A quick look at usrp_basic.h reveals:

  /*!
   * \brief Enable/disable automatic DC offset removal control loop in FPGA
   *
   * \param bits  which control loops to enable
   * \param mask  which \p bits to pay attention to
   *
   * If the corresponding bit is set, enable the automatic DC
   * offset correction control loop.
   *
   * <pre>
   * The 4 low bits are significant:
   *
   *   ADC0 = (1 << 0)
   *   ADC1 = (1 << 1)
   *   ADC2 = (1 << 2)
   *   ADC3 = (1 << 3)
   * </pre>
   *
   * By default the control loop is enabled on all ADC's.
   */
  bool set_dc_offset_cl_enable(int bits, int mask);


  /*!
   * \brief Set ADC offset correction
   * \param which       which ADC[0,3]: 0 = RX_A I, 1 = RX_A Q...
   * \param offset      16-bit value to subtract from raw ADC input.
   */
  bool set_adc_offset (int which_adc, int offset);



As it says above, "By default the control loop is enabled on all ADC's."
You should leave it that way, with the possible exception of when
using the LF RX daughterboard.

Eric


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to