discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Problems with the PLL


From: Albert Rodriguez
Subject: [Discuss-gnuradio] Problems with the PLL
Date: Wed, 23 May 2007 11:18:21 +0200

Hi everyone!
I'm trying to represent at the same time two different signals with
two scopes, so I can see if the PLL is following the signal he is
getting from the input port. However, the scopes don't work at the
same time, it's like when one of them is working, the other gets
freezed and so on! By the way, are the values of the PLL well set?
Thank u very much . I add the code:

...
alfa=0.05
        src = usrp.source_c(0, usrp_decim, fpga_filename="std_2rxhb_2tx.rbf")
        src.set_mux(gru.hexint(0x32103210))
        src.set_nchannels(2)    
        subdev_spec1 = (0,0)
        subdev_spec2 = (1,0)
        subdev1 = usrp.selected_subdev(src, subdev_spec1)
        subdev2 = usrp.selected_subdev(src, subdev_spec2)
        subdev1.set_auto_tr(True)
        subdev2.set_auto_tr(True)       
        subdev1.select_rx_antenna('RX2')        
        subdev2.select_rx_antenna('RX2')
        r=src.tune(0,subdev1,freq)
        r=src.tune(1,subdev2,freq)
        
pll=gr.pll_refout_cc(alfa/sample_rate,alfa*alfa/(4*sample_rate),1000*2*math.pi/sample_rate,5000*math.pi*2/sample_rate)

        self.scope1=scopesink.scope_sink_c(self,panel,'',sample_rate)
        self.scope2=scopesink.scope_sink_c(self,panel,'',sample_rate)

        di=gr.deinterleave(gr.sizeof_gr_complex)
        fg = gr.flow_graph ()
        
        self.connect (src,di)
        self.connect ((di,0),pll)
        self.connect ((di,0),self.scope1)
        self.connect (pll,self.scope2)

        self._build_gui(vbox)

   def _build_gui(self, vbox):

        vbox.Add(self.scope1.win, 5, wx.EXPAND)         
        vbox.Add(self.scope2.win, 5, wx.EXPAND)

...




reply via email to

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