Hi,

   Eric
On Wed, Jun 17, 2009 at 1:52 AM, Eric Blossom <e...@comsec.com> wrote:

> On Tue, Jun 16, 2009 at 09:15:34PM +0800, Su Jinzhao wrote:
> > Hi,
> >
> > I want to read RSSI value using analog AUX ADC, I think we can read RSSI
> > through AUX_ADC_A1 pin of AD9862, I looked through the code
> > of usrp_read_aux_adc in file
> > /root/gnuradio/gnuradio-3.1.3/usrp/host/lib/legacy/usrp_primes.cc,
>
> If you are using usrp_standard_rx, or gr.usrp_source_*, you can do
> this much more simply by using:
>
>  adc_val = u->read_aux_adc(which_side, which_adc)
>
> http://gnuradio.org/doc/doxygen/classusrp__basic__rx.html
> http://gnuradio.org/doc/doxygen/classusrp__standard__rx.html
>
> You didn't mention which daughterboard you are using.  Not all
> daughterboards have an analog RSSI output.


> my question is:
> 1.The AD 9862 specification says: "The AUX SPI can be enabled and
configured
> by setting register AUX ADC CTRL. Setting register use pins high enables
the
> AUX SPI port.", but in the above code AUX_ADC_CTRL_AUX_SPI was not set
high(
> In my opinion, aux_adc_control should be added with | =
AUX_ADC_CTRL_AUX_SPI
> because usrp_9862_write and usrp_9862_read all need SPI operation, so we
> should enable AUX API), Is this a mistype or another method ?

The code is correct.  There are a couple of ways to use the AUX ADCs.
> We use them by polling, not over the AUX SPI bus.
>
> > 2.stefan.bruens in the list had said that the low 16 bits is the RSSI
> value,
> > I want to know why did the above code combine the high and low 16-bit and
> > format the data into 12-bit ?
>
> This is a digital RSSI, determined post high-speed ADC.  You can look
> at the computation here:
>
>  http://gnuradio.org/trac/browser/gnuradio/trunk/usrp/fpga/sdr_lib/rssi.v
>
>
> > 3. Even with the RSSI value (int type), what should I do to convert that
> > value into dBm unit ?
>
> You would need to calibrate the entire signal path.  Left as an exercise...
>
> Eric
>

     my new questions are (Sorry for my talkactive ^_^ ) :
    1. Autually, I was indeed use u->read_aux_adc(which_side, which_adc) in
my python code, However, I can't step into the C++ code while using pdb to
debug my python code, so I am not sure whether read_aux_adc() really call
the function usrp_read_aux_adc in file
gnuradio-3.1.3/usrp/host/lib/legacy/usrp_prims.cc ?
     2. In the function usrp_read_aux_adc, we can read values of registers
26-33 directly, so I am confused with the relation between usrp_read_aux_adc
and the rssi.v code, do they have no relation ?
    3. If I want to convert the RSSI value into dBm units, means that I have
to find the reference voltage and resistance,( however, on page 16 and
30 of AD9860_9862 specification, settings of bits Refsel B/A are illustated
self-contradictory), and then calculate the power with voltage and
resistance ? Please confirm me whether my idea is correct.
     4. By the way, I am using daughterboard RFX2400 and RFX900, so I think
this two daughterboards have no problem with RSSI output.


-- 
Su Jinzhao
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to