Jump to content

Custom Function Generator


Recommended Posts

This projects implements a custom function generator (FuncGen) implemented in VHDL on Nexys 4 DDR board using PmodDA4 and PmodAD2. Command signal to the function generator is supplied from Matlab through on-board UART bridge as a 16-bit long command word (unsigned integer). Digital command signal is converted into corresponding voltage signal by DAC (Pmod DA4), which can be used to drive external device. Feedback, implemented on the ADC (PmodAD2), allows user to read the actual level of the voltage signal. The feedback signal is sent back to the DTE (PC, Matlab), using the same UART bridge. Note, that ADC used external reference voltage of 2.5V to match the reference voltage of DAC.
The current level of the voltage feedback signal is displayed on the on-board 8-digit seven segment display.














Link to comment
Share on other sites

  • 1 year later...

Hi Vonmuller,

Thanks for the code for Pmod ad2.  It's really wonderfull.  I tried to use the same logic to make ad2 works in high speed mode but I couldn't make it.  I followed the sequence showed in page 25 of the ad7991 datasheet but there is no way I can make it work in high speed.  Actually, I tried diferent frequencies but only 100khz is switable.  I noted that in that diagram, high speed mode is configured since fast mode, but in datasheet there is nothing about how to configure ad7991 in fast mode.  Can you help me with this? Any ideas?

Link to comment
Share on other sites

  • 3 weeks later...

Hi Danny,

Thank you for your positive review!

To be honest, I completed this project almost 2 years ago and never came back to it ever since, so I actually do not remember much about what I was doing there :) This litlle project wasn't my main goal, I actually made it while waiting for the proper 16-bit data converters. It was kind of a warming up exercise.

I do remember that making AD2 work was pain in the <moderated> and I do remember that datasheet wasn't really helpfull, so I understand your difficulties, but unfortunately I don't think I can help you here.

Best regards,


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...