Skip to content
/ gr-ad2 Public

GRC (GNU Radio Companion) Blocks for Digilent's Analog Discovery 2

License

Notifications You must be signed in to change notification settings

7m4mon/gr-ad2

Repository files navigation

gr-ad2

GRC (GNU Radio Companion) Blocks for Digilent's Analog Discovery 2

by 7M4MON

Based on DWF Python Example, DWF library wrapper  
[PyPi - dwf](https://pypi.org/project/dwf/)  
Modified by: MURAMATSU Atsushi  
Original Author:  Digilent, Inc.  

How to install

Notes:

  • When using GNURadio v3.8, add export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages to your ~/.profile or ~/.bashrc file. (tested Ubuntu 20.04).
  • Currently only GNURadio v3.7 is supported, because important file formats changed in v3.8 and the latest builds are not available on Raspbian. (tagged v3.7)
  • WX sinks are becoming deprecated, so QT sinks are preferred in the GRC files.

Linux (tested on Ubuntu and Raspbian)

1, You need to install the following packages (v3.7)

$ sudo apt install git cmake libboost-all-dev gnuradio=3.7.* doxygen python-pip

2, Clone this repository

$ git clone https://github.com/7m4mon/gr-ad2
$ cd gr-ad2/

3, Build each module at their "gr-AD2_AnalogXx_Xxxxxx" directory (v3.7)

$ cd GNURadio_v37/gr-AD2_AnalogXx_Xxxxxx/

When using v3.8, the blocks are combined into one mod. So, you can install at once.

$ cd GNURadio_v38/

Build as usual procedure.

$ mkdir build  
$ cd build  
$ cmake ../  
$ make  
$ sudo make install

4, Download Adept 2 Runtime and Waveforms installers from Digilent

5, Install them both, and PyPI - dwf python package

$ sudo dpkg -i digilent.adept.runtime_2.19.2-amd64.deb  
$ sudo dpkg -i digilent.waveforms_3.12.1_amd64.deb  
$ pip install dwf  

Windows (tested on Windows 10)

1, Download GNURadio v3.7 from here

2, Download and install Adept 2 Runtime and Waveforms installers from Digilent

3, Fix GNURadio's corrupted python/pip installation (run PowerShell as Administrator)

$ cd "c:\Program Files\GNURadio-3.7\gr-python27\"
$ .\python.exe -m pip install --upgrade pip --force-reinstall

4, Install the dwf python package (run PowerShell as Administrator)

$ cd "c:\Program Files\GNURadio-3.7\gr-python27\Scripts\"
$ .\pip.exe intall dwf

5, Copy the AD2-specific python files into GNURadio's python packages folder

* Find all the _init_.py and AD2_AnalogXx_Xxxxxx.py files in the subfolders of this repo
* Copy them all in separate folders into your "c:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\AD2_AnalogXx_Xxxxxx\"

6, Copy the AD2-specific block descriptor files into GNURadio's blocks folder

* Find all AD2_AnalogXx_Xxxxxx.xml files in the subfolders of this repo
* Copy them into your "c:\Program Files\GNURadio-3.7\share\gnuradio\grc\blocks\"	

How to run the flow graph

Start up the GNURadio Companion, and load any of the .brc files in this repo.

Select the Run / Execute command or press F6 to run the graph.

When you stop a flow graph, please close with not kill button but GUI 'x' button.

The device would be locked because the stop function was not called.

GNURadio flow graphs

There are several flow graph samples in this repo for different use cases.

AnalogIn_Record

AD2_AnalogFM_Demod_450kHz

450kHz FM Demod (5th nyquist zone)

AD2_AnalogFM_Demod_450kHz_Photo

AnalogIn_Record_FM_Demod.grc

AnalogIn_Record

AnalogOut_Play

AnalogOut_Play_AM_Mod

40kHz AM Modulation.

AnalogOut_Play_AM_Mod_Photo

AnalogOut_Play

AnalogOut_Sine

AnalogOut_Sine

YouTube Video

About

GRC (GNU Radio Companion) Blocks for Digilent's Analog Discovery 2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages