discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] fm modulation


From: EsserIHF
Subject: [Discuss-gnuradio] fm modulation
Date: Tue, 13 Jul 2010 05:23:00 -0700 (PDT)

Hi,
I am trying to build a simple FM transmitter. The signal should be send by
the USRP to an Spectrum Analyzer. I connected the Daughterboard BasicTX
(TX_A) to a Spectrum Analyzer, but I didn't see the expected Spectrum. 
I used the Frequency Mod Block in grc. I think this Block should modulate
the signal and the USRP send it out on 12,8 MHz. I hope you can help me
building a graph who do this simple task of frequency modulation. I also
tried the example on this website
http://www.opendigitalradio.org/index.php/Simple_FM_transmitter_using_gnuradio
, but on the spectrum analyzer i also didn't see the expected values.


from gnuradio import gr
from gnuradio.eng_option import eng_option
from grc_gnuradio import usrp as grc_usrp
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class top_block(grc_wxgui.top_block_gui):

        def __init__(self):
                grc_wxgui.top_block_gui.__init__(self, title="Top Block")

                ##################################################
                # Variables
                ##################################################
                self.samp_rate = samp_rate = 32000

                ##################################################
                # Blocks
                ##################################################
                self.gr_frequency_modulator_fc_0 = gr.frequency_modulator_fc(3)
                self.gr_multiply_const_vxx_0 = gr.multiply_const_vcc((100, ))
                self.gr_multiply_const_vxx_1 = gr.multiply_const_vff((10, ))
                self.gr_sig_source_x_0_0 = gr.sig_source_f(6400, 
gr.GR_CONST_WAVE, 3200,
1, 0)
                self.usrp_simple_sink_x_0 = grc_usrp.simple_sink_c(which=0, 
side="A")
                self.usrp_simple_sink_x_0.set_interp_rate(200)
                self.usrp_simple_sink_x_0.set_frequency(12800000, verbose=True)
                self.usrp_simple_sink_x_0.set_gain(0)

                ##################################################
                # Connections
                ##################################################
                self.connect((self.gr_frequency_modulator_fc_0, 0),
(self.gr_multiply_const_vxx_0, 0))
                self.connect((self.gr_sig_source_x_0_0, 0), 
(self.gr_multiply_const_vxx_1,
0))
                self.connect((self.gr_multiply_const_vxx_1, 0),
(self.gr_frequency_modulator_fc_0, 0))
                self.connect((self.gr_multiply_const_vxx_0, 0),
(self.usrp_simple_sink_x_0, 0))

        def set_samp_rate(self, samp_rate):
                self.samp_rate = samp_rate

if __name__ == '__main__':
        parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
        (options, args) = parser.parse_args()
        tb = top_block()
        tb.Run(True)

-- 
View this message in context: 
http://old.nabble.com/fm-modulation-tp29149390p29149390.html
Sent from the GnuRadio mailing list archive at Nabble.com.




reply via email to

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