# How to use the rx_decim and interp

Hi,

Am trying to send IQ samples of float from one usrp2 to another usrp2.
As an ex: am taken the data of Sinusoidal generated from MATLAB, and
pumping into the 1st one using tx_samples and receiving into the 2nd
usrp2, and collecting into output file using -I option to the
rx_streaming_samples. I have just changed in the rx_streaming_samples.cc
(Actually i saw the output file creating like binary data), to convert
the host_items[i] complex into the real, imag and writing into the
output file, and trying to plot. I observed the values, there is no near
matching. And also i am using attenuators to test ideally rather
connecting the antennas on both usrp2.

How to use the rx_decim on rx side and interp on tx side? What is the
equation of sampling rate, and how the both rx_decim and interp are
related?

And also am trying to understand the ADC/DAC rates. I just put the
usrp2::impl::impl() to see, i got both values printed as 1, (assuming 1
MHz or 1 MS/s). But from gnuradio.org site, i saw that ADCs (100 MS/s)
and DAC (400 MS/s). So can able to set these values also?

(ie., sending IQ samples, lets say 10 MS/s rate).

best regards,
srinivas.

On Tue, Jan 19, 2010 at 05:17:56PM +0530, srinivas naga vutukuri wrote:

And also am trying to understand the ADC/DAC rates. I just put the
usrp2::impl::impl() to see, i got both values printed as 1,
(assuming 1 MHz or 1 MS/s). But from gnuradio.org site, i saw that
ADCs (100 MS/s) and DAC (400 MS/s). So can able to set these values
also?

A quick look at the documentation or code will reveal that these
functions return a bool for success or failure, and the actual value
by reference:

`````` // Get Sampling rate of A/D converter in Hz

// Get Sampling rate of D/A converter in Hz
bool dac_rate(long *rate);
``````

Eric

Yes, now correctly calling those two members, got 100M on ADC and DAC.
But when i use interp = 4 and rx_decim = 4 what ever input samples
tranmsitting is not correctly coming out? Any thought on this?

best regards,
srinivas.

On Wed, Jan 20, 2010 at 12:02:16PM +0530, srinivas naga vutukuri wrote:

Yes, now correctly calling those two members, got 100M on ADC and
DAC. But when i use interp = 4 and rx_decim = 4 what ever input
samples tranmsitting is not correctly coming out? Any thought on
this?