Creating a sine wave of desired frequency

Hello everyone!

I just wanted to generate a sine wave and a square wave of desired frequency and amplitude. Just been through a lot of discussion and all got messed up. So can anyone please list the full and detailed procedure to do so. I'll be really thankful.

Buy a function generator. The Arduino is a poor choice to do anything except a square wave with any kind of accuracy.

What are you really trying to do?

But the Due has a pair of DACs so its possible to do fairly well.

Lookup direct digital synthesis...

MorganS: Buy a function generator. The Arduino is a poor choice to do anything except a square wave with any kind of accuracy.

What are you really trying to do?

Hello MorganS I just wished that since Due has DACs then they must be worth something! How come they suddenly become useless(not actually).

And also i intend to have variable amplitude DC signal. That purpose was there for me to use the DUE to be honest.

That must be kept in mind "A VARIABLE AMPLITUDE DC SIGNAL".

The DAC output of the Due is limited to 0.7V-2.5V. To turn that into any kind of useful signal you will need analog circuits such as opamps. What voltage do you want? What frequency?

What do you mean "variable amplitude DC"? If it's DC then it doesn't change and it's not variable. You might specify that you need an output variable between 0-5V referenced to ground and the maximum frequency is 5Hz (this means it can go from 0 to 5 OR 5 to 0 in one tenth of a second.) How much power do you need for this signal? 3mA? 30mA?

The SAM3X has a real-time-clock and Ethernet but it's completely useless on the Due board because those pins are not accessible without some extremely fine soldering skills. The DAC is not useless but it takes some work to make it useful.

That was some serious HELP from you Mr.MorganS. Thanks a lot And i will get back soon regarding the requirements of mine. Thanks again