Sign in to follow this  
Vonmuller

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.

a2d.vhd

brgen.vhd

clock.vhd

dig2an.vhd

disp.vhd

fbin2bcd.vhd

func_gen.vhd

ibin2bcd.vhd

rx.vhd

ssd.vhd

tx.vhd

Nexys4DDR_Master.ucf

func_gen.m

Edited by Vonmuller

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this