[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] usrp_fft.py questions

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] usrp_fft.py questions
Date: Sun, 24 Apr 2005 12:52:56 -0700
User-agent: Mutt/1.5.6i

On Wed, Apr 20, 2005 at 05:38:51PM -0400, Anastasopoulos Achilleas wrote:
> Dear all,
> I guess I should have spent more time experimenting and
> studying the examples before asking these questions.
> In any case, I have resolved both issues:
> I added the piece of code in both usrp_fft.py and usrp_oscope.py
> to be able to compensate for this offset in all these programs:

Matt posted a nice description of this a while back.  See

The easy way to fix this for all applications is to store the correct
calibration constants in the EEPROM associated with the given Rx
daughterboard.  Then all applications "just work" automatically.
The current library code queries the daughterboards for these
calibration constants and writes them to the FPGA when the usrp is

There is a low level routine already written that does the correct
operation (usrp_prims.h):

 * \brief write ADC/DAC offset calibration constants to d'board eeprom
bool usrp_write_dboard_offsets (struct usb_dev_handle *udh, int slot_id,
                                short offset0, short offset1);

It needs to be made accessible through usrp_basic.{h,cc} in
usrp/host/lib and then made accessible to python through usrp1.i and
friends in gr-usrp/src

If you've got the time and inclination to make all this work, 
a patch would be most appreciated.  

The existing usrp_basic_{rx,tx} write_io methods are similar
to the glue you'd need to write.  You would need to modify
usrp: usrp_basic.{h,cc}, gr-usrp: usrp1_{sink,source}_base.{h,cc} and

The new methods in usrp_basic_{rx,tx} should have this signature:

   * \brief Write daughterboard calibration offsets to EEPROM
   * \param which_dboard        [0,1] which d'board
   * \param offset0             DC offset for I
   * \param offset1             DC offset for Q
   bool _write_dboard_offsets(int which, short offset0, short offset1);

> All is needed is to measure the average DC term and use some sort of
> AGC (I think it is already implemented in gnuradio) to drive the DC offset
> close to 0. I might take a crack at it later, but now I am satisfied
> with the manual way of compensation.

Yes, we'd still need a single calibration program that would determine the
right constants and then write them to the daughterboard EEPROMs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]