discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] DBSRx set_rx_freq()


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] DBSRx set_rx_freq()
Date: Tue, 13 Dec 2005 23:10:11 -0800
User-agent: Mutt/1.5.6i

On Wed, Dec 14, 2005 at 12:05:13AM -0500, Lee Patton wrote:
> Not exactly sure why this is, but the call to set_rx_freq() in
> usrp_rx_cfile.py does not work for the DBSRX board, and should be
> replaced as follows:
> 
> 25c25
> <     u.set_rx_freq (0, options.ddc_freq)
> ---
> >     r = usrp.tune( u, 0, usrp.selected_subdev( u, (0,0)),
> options.ddc_freq);

Correct, but see below regarding selecting subdevices on command line.

Also, you can now use the slightly more compact:

  r = u.tune(0, usrp.selected_subdev(u, options.rx_subdev_spec), 
options.ddc_freq);


> A cursory look at the code seems to show that usrp.tune(..) calls the
> sub device's (db_dbs_rx.py's) set_freq(...) method, while the
> u.set_rx_freq(...) method belongs to usrp1.py, and sets the DDC only.
> Eric, is that right?

Yes.  The usrp.tune function encapsulates the common operation of
setting both the RF front end frequency and the DDC frequency. (Works
for both Tx and Rx too).  For the typical case of a single channel, single
DDC/DUC, it's the way to go.

> All files that call set_rx_freq() are affected.  I assume the
> set_rx_freq(.) method works for other board that aren't direct
> conversion, is that true?  Is this a known issue, or am I missing
> something?

Doesn't really have anything to do with direct conversion.  Unless
you've got a compelling reason not to use usrp.tune (u.tune(...)), you
should use it.

usrp.tune (u.tune(...)) uses the selected daughterboard specific code
to set the frequency of the RF front end.  These have finite steps,
for example 1 MHz on the Flex 400 boards.  The daughterboard set_freq
method returns the actual frequency that corresponds to DC in the
baseband signal.  This is used in combination with the originally
input "target_freq" to determine how to set the DDC in the FPGA.
The end result is that you get the the desired frequency at baseband.

> Thanks,
>   - Lee

There are still some files that can use updating.  Thanks for
your help fixing them.

The best examples of "How it Should Be Done (TM)" are usrp_fft.py and
fm4_tx.py.  They properly deal with *any* daughterboard, and allow you
to select which daughterboard to use (side A vs side B) on the command
line.  Note especially the -R and -T command line options.

Eric




reply via email to

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