discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Howto tune RF frequency in blocks?


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Howto tune RF frequency in blocks?
Date: Mon, 10 Jul 2006 19:19:59 -0700
User-agent: Mutt/1.5.9i

On Tue, Jul 11, 2006 at 10:03:11AM +0800, hanwen wrote:
> Thanks, Eric. Would you please tell me the exact C++ functions which do the
> tuning?

You can shift the frequency by multiplying by a complex exponential.

        # Local oscillator
        lo = gr.sig_source_c (if_rate,        # sample rate
                              gr.GR_SIN_WAVE, # waveform type
                              lo_freq,        # frequency
                              1.0,            # amplitude
                              0)              # DC Offset
        mixer = gr.multiply_cc ()
    
        fg.connect(src, (mixer, 0))
        fg.connect(lo, (mixer, 1))
        fg.connect(mixer, <next-block-downstream>)

Or you could use one of the pll blocks.
$ ls -l gnuradio-core/src/lib/general/gr_*pll*.h


> Is there any C++ class relating the usrp class in python?

Yes, but not exactly.  Some of the functionality is implemented in
pure python.  The C++ part is in usrp/host/lib/usrp_{basic,standard}.{h,cc}

Eric




reply via email to

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