Page 1 of 2

gnuradio & XADC

Posted: Mon Mar 05, 2018 1:23 pm
by tech62
Hi,
Has any work been done on interfacing with the "slow" XADC (onboard ADC) and onboard DACs from gnuradio or GRC ? eg sink or source blocks for those.

Are there any example to assist me in interfacing with those slower analog io on the RP ?

Thanks for any sugestions.

Re: gnuradio & XADC

Posted: Fri Mar 09, 2018 7:25 am
by tech62
Is anyone interested in doing this task for me for payment ?
Ideally I'm after a pair of blocks in GRC to sink and source from a single channel of the onboard XADC and the onboard DAC.

The RP side would also need updating to interface to these blocks, so its a task for someone experienced in building RP from source.

PM or email me if interested.
Regards.

Re: gnuradio & XADC

Posted: Fri Mar 09, 2018 9:39 am
by pavel
and the onboard DAC.
Do you mean the PWM pins by the "slow onboard DAC"?

Re: gnuradio & XADC

Posted: Sat Mar 10, 2018 7:36 am
by tech62
Good point.
Yes, I mean the PWM outputs contained on the FPGA itself which come out to the E2 connector.
I am only interested in 1 channel of both slow ADC and slow DAC.

Ideally I would like the new GRC blocks to be similar to the existing GRC audio sink/source blocks...allowing me to capture signals of low frequency eg 0 - 20kHz, with perhaps a 48 k sample rate...just like with the audio blocks but from external circuits (not just the mic and speakers).

My intention is to capture these baseband signals via RP (message in), process in GR, then output from the fast RP sink blocks (carrier out), to some external hardware, then back into fast RP source clock (carrier in), process in GR, and output from the new slow DAC (message out).

So the RP would have a fast pair of sink/source in GRC as well as a slow pair of sink/source in GRC.

This is for an educational purpose, so I wish to have access to the signals at each of these stages.
Thanks for any assistance.

Re: gnuradio & XADC

Posted: Mon Apr 09, 2018 1:54 pm
by tech62
if anyone is interested in this project, please PM me any further questions.
The spec is flexible and open to suggestions.
Regards.

Re: gnuradio & XADC

Posted: Mon Apr 09, 2018 9:54 pm
by pavel
Have you considered a solution with a USB audio interface connected to Red Pitaya?

There are USB audio interfaces with line in and line out:
https://www.storedj.com.au/behringer-u- ... -interface

I think that a combination of aplay, arecord, nc, TCP source and TCP sink can be used for the communication with GNU Radio.

Re: gnuradio & XADC

Posted: Tue Apr 10, 2018 6:27 am
by tech62
I have not. That is an interesting option I can explore.
Perhaps I can find an audio device with GRC drivers already written.

Can you explain what you mean by "aplay, arecord, nc, TCP source and TCP sink" ... in relation to these USB devices and GNU Radio ?

Re: gnuradio & XADC

Posted: Tue Apr 10, 2018 8:08 am
by pavel
Can you explain what you mean by "aplay, arecord, nc, TCP source and TCP sink" ... in relation to these USB devices and GNU Radio ?
The arecord and aplay commands can be used to receive and to send the data from/to a USB audio interface.

The nc command can be used to receive and to send the data from/to a network interface.

These commands can be combined:

Code: Select all

arecord -fFLOAT_LE -c2 -r48000 | nc -lk -p 2001 &
nc -lk -p 2002 | aplay -fFLOAT_LE -c2 -r48000 &
With these commands running on Red Pitaya, the TCP source and TCP sink GNU Radio blocks can be used on a remote computer to stream the data from/to the ports 2001 and 2002.

Re: gnuradio & XADC

Posted: Tue Apr 10, 2018 8:14 am
by pavel
Perhaps I can find an audio device with GRC drivers already written.
The drivers for audio devices are at the OS level, not GNU Radio.

UCA-202 is reported to work well under Linux:
http://www.larrytalkstech.com/behringer ... ace-linux/
http://jamie.lentin.co.uk/peripherals/b ... r-uca-222/

Re: gnuradio & XADC

Posted: Tue Apr 10, 2018 9:14 am
by tech62
Thanks again.
I will follow these leads and see how I go.