user80406: I new in Arduino environment.
Found some code generate sine wave but frequency between 14kHz to 84kHz. URL is https://www.instructables.com/SineWave-Generator-for-Arduino-DUE/
I need to generate sine waze 400kHz frequency.
Output should be on DAC0 or DAC1.
Any one can help to solve my problem.

user71575: I think you may be overestimating the capabilities of the Due DAC. My understanding and experimentation is that waveform generating code (e.g., https://forum.arduino.cc/t/funkgenie-a-wavetable-based-function-generator/214938) can generate consistent output waves up to “a few kHz”. After which the wave shapes suffer from distortion.
If wave shape is not critical (though you did mention you specifically needed a sine wave) you may be able to push further using PWM outputs (e.g., https://forum.arduino.cc/t/due-high-frequency-waveform-up-too-500khz/423392).
However, I think you may need to design a suitable electronic circuit to generate the wave you’re seeking. That may be a topic for the Electrical Engineering stack exchange though? There is an introduction to wave generation circuit options going up into the RF frequencies here.

user4143: The Due's DAC can go up to, and I quote direct from the datasheet:

Up to 350ksps conversion rate

That means you can set up to 350,000 data points on your waveform per second. With two datapoints (giving you a square wave or, more realistically, a waveform with a sharks fin shape) the maximum you could get is (350,000/2) 175kHz.
Given that you stipulate you want a sine wave you're going to need many more than just 2 data points in your waveform. Assuming a (reasonable) minimum of 32 data points (more would give a smoother waveform) you'd be looking at a maximum frequency of about 10kHz. Sacrificing waveform fidelity you could increase that, but the higher you go the less and less it resembles a sine wave.

80406: <p>I new in Arduino environment.
Found some code generate sine wave but frequency between 14kHz to 84kHz. URL is <a href="https://www.instructables.com/SineWave-Generator-for-Arduino-DUE/" rel="nofollow noreferrer">https://www.instructables.com/SineWave-Generator-for-Arduino-DUE/</a></p>
<p>I need to generate sine waze 400kHz frequency.
Output should be on DAC0 or DAC1.</p>
<p>Any one can help to solve my problem.</p>
 71575: <p>I think you may be overestimating the capabilities of the Due DAC. My understanding and experimentation is that waveform generating code (e.g., <a href="https://forum.arduino.cc/t/funkgenie-a-wavetable-based-function-generator/214938" rel="nofollow noreferrer">https://forum.arduino.cc/t/funkgenie-a-wavetable-based-function-generator/214938</a>) can generate consistent output waves up to “a few kHz”. After which the wave shapes suffer from distortion.</p>
<p>If wave shape is not critical (though you did mention you specifically needed a sine wave) you may be able to push further using PWM outputs (e.g., <a href="https://forum.arduino.cc/t/due-high-frequency-waveform-up-too-500khz/423392" rel="nofollow noreferrer">https://forum.arduino.cc/t/due-high-frequency-waveform-up-too-500khz/423392</a>).</p>
<p>However, I think you may need to design a suitable electronic circuit to generate the wave you’re seeking. That may be a topic for the Electrical Engineering stack exchange though? There is an introduction to wave generation circuit options going up into the RF frequencies <a href="https://www.circuitbasics.com/sine-wave-generators/" rel="nofollow noreferrer">here</a>.</p>
 4143: <p>The Due's DAC can go up to, and I quote direct from the datasheet:</p>
<blockquote>
<p>Up to 350ksps conversion rate</p>
</blockquote>
<p>That means you can set <em>up to</em> 350,000 data points on your waveform per second. With two datapoints (giving you a square wave or, more realistically, a waveform with a sharks fin shape) the maximum you could get is (350,000/2) 175kHz.</p>
<p>Given that you stipulate you want a sine wave you're going to need many more than just 2 data points in your waveform. Assuming a (reasonable) minimum of 32 data points (more would give a smoother waveform) you'd be looking at a maximum frequency of about 10kHz. Sacrificing waveform fidelity you could increase that, but the higher you go the less and less it resembles a sine wave.</p>
