I’m currently trying to create a triangular waveform that will go as fast as possible with an Arduino Due, and have it act as an input to another device. I currently have it generating a triangular wave from 0 to 5V in 1/255 increments with 1 microsecond per increment. However, I need it to go much faster than this. I understand that Arduino products have a clock cycle time of 62.5ns, and I would like to tap into this if possible, however there is no delay function smaller than microseconds. I am rather new at programming Arduino products, so any help would be greatly appreciated. I understand that this may mean that I need to hack into the Arduino, and the programming language completely changes when you do that. If that is the case then could someone please give me a link with instructions on how to work with this new programming language? My current program with the delay in microseconds is attached. I thank you all ahead of time for your assistance.
Due_waveform.ino (379 Bytes)