PYNQ: PYTHON PRODUCTIVITY

Digilent PmodDA4

Hello there,
I had one PmodDA4 board available to play with and didn’t like the restricted access to it standard Pmod_DAC allows… so I created a different class Pmod_DA4 to allow control of all eight DAC output channels in fixed mode.

It needs to add one file to the PYNQ-Z1 file system:
/usr/local/lib/python3.6/dist-packages/pynq/lib/pmod/pmod_da4.py
and add one line to the init.py files in:

  • /usr/local/lib/python3.6/dist-packages/pynq/lib/pmod
  • /usr/local/lib/python3.6/dist-packages/pynq/lib

so that the new class can be imported and used in Jupyter notebooks.
The modified files are attached. Maybe I could contribute it to the GitHub Pynq repo?
Adding a Jupyter notebook use example?
Best regards
init.py|attachment (2.8 KB)
init.py|attachment (2.9 KB)
pmod_da4.py (3.6 KB)

If you think the pmod_dac.py needs some improvement, you can do a pull request (PR) against the pynq repo. We can provide some feedback as well. Make sure do the PR against image v2.6.0 branch so it will get tested when we do next release. For jupyter notebook, if possible, you can add some cells to existing notebooks to show a use example.

OK. I will try, as said I am not particularly familiar with github collaboration.

Hello @gpcus,

Thank you for writing this.
Can you possibly give some info on your process of creating this module?
I would like to do something similar to exploit all four inputs of the Pmod AD5.

I would like to do it for the AD2 as well but, on the pynq.lib.pmod Package page, it says that the AD2 has 4 channels but “the 4th channel is not available due to the jumper setting on ADC.” The channel is connected to a reference which I assume is needed for the AD7991 onboard. Do you have any experience using the AD2?

I’ve written a small example using your module.
It’s very basic, but here it is if anyone is interested.
https://github.com/ReynaldoGonzalez/pynq/blob/master/pmodDA4/pmod_da4.ipynb

Your help is appreciated,
Reynaldo