[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Interpolation, BasicTX, and tune()
From: |
Eric R Menendez |
Subject: |
[Discuss-gnuradio] Interpolation, BasicTX, and tune() |
Date: |
Tue, 13 Mar 2007 18:23:13 -0400 |
Hello all--
I am a GNU Radio beginner attempting to build a simple CB radio
transmitter (26-27MHz AM) with the USRP and BasicTx.
I've started with fm_tx4.py (from the examples) and modified it to use
AM modulation and run at CB frequencies. However, I have a few
questions:
- What does the tune() function do when using the BasicTx? The BasicTx
does not have its own oscillator, correct? If so, how can it tune to
anything? e.g.:
self.u = usrp.sink_c () # the USRP sink (consumes samples)
r = self.u.tune(self.subdev._which, self.subdev, target_freq)
- My program reads in an audio file sampled at 8ks/s and mixes it with
a 26.695MHz sine wave sampled at 128Ms/s. Therefore, the audio file must
be interpolated by a factor of 16000 before it is multiplied with the
carrier. (see code below) What is the simplest way to accomplish this?
I've noticed that some of the examples do this with a filter; why is it
done that way?
class pipeline(gr.hier_block):
def __init__(self, fg, filename, lo_freq, audio_rate, if_rate):
src = gr.file_source (gr.sizeof_float, filename, True)
# 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 ()
converter = gr.float_to_complex ()
interpolater = # Interpolate src by factor of if_rate/audio_rate
fg.connect (src, converter, interpolater, (mixer, 0))
fg.connect (lo, (mixer, 1))
gr.hier_block.__init__(self, fg, src, mixer)
Thanks for your help!
Sincerely,
Eric Menendez
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Discuss-gnuradio] Interpolation, BasicTX, and tune(),
Eric R Menendez <=