discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Basic USRP AM Transmission


From: Robert Roberts
Subject: Re: [Discuss-gnuradio] Basic USRP AM Transmission
Date: Mon, 17 Apr 2006 17:48:15 -0400


----- Original Message -----
From: Martin Dvh <address@hidden>
Date: Monday, April 17, 2006 3:06 pm
Subject: Re: [Discuss-gnuradio] Basic USRP AM Transmission
> Robert Roberts wrote:
> > Hello everyone,
> > 
> > 
> > I have been experimenting with the Flex400 board and have been 
> trying to
> > implement a basic AM transmitter. I have a WFM and NFM transmitter
> > working, but I cannot get the AM one to transmit correctly.   The 
> code> below generates a much higher frequency tone.  Any advice to 
> what I am
> > doing wrong?   Does my output need filtering before connecting to 
> the> sink?     
> > 
> > 
> > self.u = usrp.sink_c ()       # the USRP sink
> > 
> > # Code here for setting up the USRP, omitted
> > 
> > src = gr.file_source (gr.sizeof_float, "audio-1.dat", True) # 
> 440Hz tone
> > file
> What is the sample_rate of the audio file
> What is you interpolation rate of the usrp
> What is the duc frequency of your usrp.

I have the file source sampled at 32kS/s

I use the following code for setting up my usrp:

        self.dac_rate = self.u.dac_rate()                    # 128 MS/s
        self.usrp_interp = 400
        self.u.set_interp_rate(self.usrp_interp)
        self.usrp_rate = self.dac_rate / self.usrp_interp    # 320 kS/s
        self.sw_interp = 10
        self.audio_rate = self.usrp_rate / self.sw_interp    # 32 kS/s

        # determine the daughterboard subdevice we're using
        if options.tx_subdev_spec is None:
            options.tx_subdev_spec = usrp.pick_tx_subdevice(self.u)

        m = usrp.determine_tx_mux_value(self.u, options.tx_subdev_spec)
        self.u.set_mux(m)
        self.subdev = usrp.selected_subdev(self.u, options.tx_subdev_spec)
        print "Using TX d'board %s" % (self.subdev.side_and_name(),)

        self.subdev.set_gain(self.subdev.gain_range()[1])    # set max
Tx gain
        self.set_freq(options.freq)
        self.subdev.set_enable(True)                         # enable
transmitter


This is the same code I used for both a NFM and WFM transmitter, both of
which appeared to transmit without problems.

Sincerely,
~Chris~
> If the sample rate of your audio file is for example 48000 Herz
> Then the usrp interpolation rate should be 128000000/48000 = 2666
> Which is I think way out of range for the usrp
> You first have to interpolate in software to something in the range 
> of the usrp.
> 
> Greetings,
> Martin
> > const = gr.add_const_ff (1.0)
> > conv = gr.float_to_complex()
> > 
> >                
> > gain = gr.multiply_const_cc (4000.0) # transmitter gain
> > 
> > # connect it all
> > 
> > self.connect (src, const)
> > self.connect (const, conv)
> > self.connect (conv, gain)
> > self.connect (gain, self.u)
> > 
> > 
> > 
> > 
> > Thanks,
> > ~Chris~
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> > 
> 
> 




reply via email to

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