[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] io_type configuration for uhd.single_usrp_source
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] io_type configuration for uhd.single_usrp_source |
Date: |
Wed, 20 Jul 2011 23:41:50 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 |
On 07/20/2011 12:24 PM, Yan Nie wrote:
> Dear all,
>
> I am using USRP N200 +UHD with the LFRX daughter board to detect a
> 100kHz coded sinusoid wave then down convert the signal to baseband
> to see the coding method. The flow graph I am using is:
>
> u2=uhd.single_usrp_source(device_addr="addr=192.168.10.2",io_type=uhd.io_type_t.COMPLEX_INT16,num_channels=1)
> decim_coeffs = gr.firdes.low_pass(1.0, 60e3, #sampling frequency
> 30e3, #cutoff frequency .1e3, gr.firdes.WIN_BLACKMAN)
> decim_filter = gr.fir_filter_fcc(1,decim_coeffs)
> dst=gr.file_sink(gr.sizeof_gr_complex, filename) connect(u2,
> decim_filter,dst)
>
> I am curious about how to configure the io_type_t for the receiver?
> COMPLEX_INT16 represents complex signed integer, 16-bit integer. I
> found only this io type could match the type provided for the input
> of fir_filter. Do I misunderstand something for this io type
> selection?
>
well, sizeof(complex<short>) == sizeof(float), which means gnuradio will
let you connect those blocks, but that definitively wont work.
For the UHD source, use COMPLEX_FLOAT32. For the FIR filter, use complex
input.
gnuradio-companion might help you a lot:
http://en.wikipedia.org/wiki/GNU_Radio_Companion
-josh