MCP4725 DAC breakout board

Hi All,

I am trying to make a custom waveform generator using Arduino Uno and MCP4725 DAC breakout board.
I have a graph of data (saved on my computer) where x axis is time in milliseconds and y axis is the adc range from 0 to 4095 (12 bit) all the data points are equally spaced in time.
The data is huge the x axis goes till 30000 (milliseconds)

I am trying to output the data on a COM port using processing or python,
The arduino reads it and sends the appropriate command to spit out the equivalent DAC voltage.
eg - if i am sending 2048 data (on serial COM port to the arduino) then its 2.5v at the dac output.

Can you help me in the latency calculation of the whole system?

Thanks and Regards.

vinomlele94:
Can you help me in the latency calculation of the whole system?

If you explain what you mean by "the latency calculation" I'm sure we will try to help.

And it would be a good start if you post your Arduino code so we can see what you can see.

...R

PS ... To make it easier for people to help you please use the code button </>

so your code looks like this

and is easy to copy to a text editor. See How to use the Forum

You need send the time data (X) as well as the DAC data (Y). Use the millis() or micros() functions to calculate time between updates of the Y value.

Have a look at the demo code in the IDE under basic examples called "blink without delay" for how to create a programmable time lag between DAC updates.

You may find that the serial comms will limit the throughput/update rate, its dependent upon baud rate and the number of characters transmitted.

zonef46:
As you know the max baud-rate is 115200 for com port to use

Where did that come from?

I normally use 500,000 baud for communication between my PC and my Uno or Mega.

...R