I have a project that I am working on in my RF class. That requires a function generator to output a triangle wave front that operate at 1MHz. Is there any way that I can used a Arduino Uno to produce is wave front. I tried to use a DAC chip with it but the highest freq I could get that was clean was around 8KHz and it was still a little choppy. Thank you for your time. ![]()
There are many projects that do this already. Google "Arduino function generator" or "Arduino wave generator"
digitalWrite takes 10x as long to do the same thing as True C (which sets the registers that control the pin outputs, you can even set multiple pins at the same exact time)
Doing a little research, you should be able to switch the outputs at 2.873Mhz (based on a result of 1000 switches taking 348uS)
You could make your own DAC really easily, look up R/R2 DAC on Google.
turtle27:
I have a project that I am working on in my RF class. That requires a function generator to output a triangle wave front that operate at 1MHz. Is there any way that I can used a Arduino Uno to produce is wave front. I tried to use a DAC chip with it but the highest freq I could get that was clean was around 8KHz and it was still a little choppy.
Yes that is what you can expect.
There is no way you can get 1MHz out of an Arduino UNO. It only runs at 16MHz and if you could get one sample out every two clock pulses, which you can't that would only leave you 8 steps in the waveform which would no doubt look very choppy.