[Top][All Lists]

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

Re: [Discuss-gnuradio] usrp.source_s and usrp.source_c

From: Matt Ettus
Subject: Re: [Discuss-gnuradio] usrp.source_s and usrp.source_c
Date: Fri, 03 Nov 2006 16:16:01 -0800
User-agent: Thunderbird (X11/20060922)

Dawei Shen wrote:
> Hi, Guys
> I am suddenly a little bit confused about the difference between
> usrp.source_s and usrp.source_c. Basically I have two questions:
> 1. Since the ADC only has 12 bits, does it mean the short integers
> entering the computer have their last four bits as zeros? Or are their
> first four digits are zero (the first bit should be the sign)?
When you decimate a 12-bit signal, more bits of precision are created. 
That is why all 16 bits are used.

> 2. Is anything interesting done when the short integers converted to
> float values? Or are they simply converted to a different type without
> changing the values?
Nothing other than a conversion -- Please see the code

  *for* (*int* i = 0; i < nitems; i++){
    out[i] = gr_complex ((*float*) usrp_to_host_short(s16[2*i+0]),
                         (*float*) usrp_to_host_short(s16[2*i+1]));  }


reply via email to

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