Signal Generator using R2R DAC and Arduino

Thread Starter

rockgro

Joined Sep 7, 2021
19
I want to create a sine wave generator with a 12bit DAC using R2R network directly connected to Arduino's 12 digital outputs! What is the max frequency I can achieve with this idea??
 
Last edited:

Ian0

Joined Aug 7, 2020
9,814
How fast can you update the data on the ports?
Hypothetically, the maximum frequency is 1/(2t) where t is the time it takes to update the port with the new data.
Practically, to achieve f=1/(2t) you would need a "brick wall" filter after the R2R network, and there is no such thing.
A 12-bit DAC can achieve a signal-to-noise ratio of 1:4096 or 72dB. With a 4th order filter, it would require 3 octaves, so f=1/(16t) would be the maximum, or 2 octaves with a sixth order filter f=1/(8t)
Can you update all 12 pins simultaneously? If not, it will make a mess of the waveform if some update at different times to others, so perhaps a D-type latch such as 74HC174 or 74HC574 would be a good idea.

I know this is a hypothetical exercise, but it's almost certain that someone will tell you to use a 12-bit DAC IC.
 

ScottWang

Joined Aug 23, 2012
7,400
What is the max frequency I can achieve with this idea??
You can output a high from Do pin, and output Low from the Do pin again and measure its wavelength, f=(1/t)*4096, I think that is the fastest frequency that you can get.

How fast frequency that you want?
 
Top