[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Re: Re: xcvr2450, v3.2 and usrp1
From: |
William Sherman |
Subject: |
[Discuss-gnuradio] Re: Re: xcvr2450, v3.2 and usrp1 |
Date: |
Mon, 22 Jun 2009 23:08:54 +0200 |
Eric Blossom wrote:
> On Mon, Jun 22, 2009 at 06:30:26AM +0200, William Sherman wrote:
>> The xcvr transmits at the incorrect frequency. I just looked at it with
>> a wider span of the spectrum analyser. Asking it to transmit at 2.45GHz,
>> it instead transmits signals at 2.58GHz. What could be causing this?
>
> Not sure.
>
> Try using:
>
> $ usrp_sigggen.py -f 2.45G --const -a 8000
>
> Eric
No it still transmits at 2.58GHz.
I guess there's a problem with db_xcvr2450.cc?
Here is the db_xcvr2450.cc set_freq code in my gnuradio 3.2
installation:
struct freq_result_t
xcvr2450::set_freq(double target_freq)
{
struct freq_result_t args = {false, 0};
double scaler;
if(target_freq > 3e9) {
d_five_gig = 1;
d_ad9515_div = 3;
scaler = 4.0/5.0;
}
else {
d_five_gig = 0;
d_ad9515_div = 3;
scaler = 4.0/3.0;
}
if(target_freq > 5.408e9) {
d_highband = 1;
}
else {
d_highband = 0;
}
double vco_freq = target_freq*scaler;
double sys_clk = usrp()->fpga_master_clock_freq(); // Usually 64e6
double ref_clk = sys_clk / d_ad9515_div;
double phdet_freq = ref_clk/d_ref_div;
double div = vco_freq/phdet_freq;
d_int_div = int(floor(div));
d_frac_div = int((div-d_int_div)*65536.0);
// double actual_freq =
phdet_freq*(d_int_div+(d_frac_div/65536.0))/scaler;
//printf("RF=%f VCO=%f R=%d PHD=%f DIV=%3.5f I=%3d F=%5d ACT=%f\n",
// target_freq, vco_freq, d_ref_div, phdet_freq,
// div, d_int_div, d_frac_div, actual_freq);
set_gpio();
set_reg_int_divider();
set_reg_frac_divider();
set_reg_bandselpll();
args.ok = lock_detect();
#ifdef NO_LO_OFFSET
args.baseband_freq = target_freq;
#else
args.baseband_freq = actual_freq;
#endif
if(!args.ok){
printf("Fail %f\n", target_freq);
}
return args;
}
--
Posted via http://www.ruby-forum.com/.
- [Discuss-gnuradio] xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/15
- [Discuss-gnuradio] Re: xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/17
- [Discuss-gnuradio] Re: xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/22
- Re: [Discuss-gnuradio] Re: xcvr2450, v3.2 and usrp1, Eric Blossom, 2009/06/22
- [Discuss-gnuradio] Re: Re: xcvr2450, v3.2 and usrp1,
William Sherman <=
- Re: [Discuss-gnuradio] Re: Re: xcvr2450, v3.2 and usrp1, Johnathan Corgan, 2009/06/22
- Re: [Discuss-gnuradio] Re: Re: xcvr2450, v3.2 and usrp1, Johnathan Corgan, 2009/06/23
- Re: [Discuss-gnuradio] Re: Re: xcvr2450, v3.2 and usrp1, Johnathan Corgan, 2009/06/23
- [Discuss-gnuradio] Re: Re: Re: xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/23
- Re: [Discuss-gnuradio] Re: Re: Re: xcvr2450, v3.2 and usrp1, Johnathan Corgan, 2009/06/23
- [Discuss-gnuradio] Re: Re: Re: xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/23
- [Discuss-gnuradio] Re: Re: Re: xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/24
- [Discuss-gnuradio] Re: Re: Re: xcvr2450, v3.2 and usrp1, William Sherman, 2009/06/25
- Re: [Discuss-gnuradio] Re: Re: Re: xcvr2450, v3.2 and usrp1, Johnathan Corgan, 2009/06/29