I need to generate two 100kHz square waves using Arduino Uno. The waves need to have a phase shift of 180 degrees between them. I need to control the duty cycle using a potentiometer. So, the frequency and the phase shift are fixed and the duty cycle no.
I already got how to generate the waves and control the duty cicle, but I am not been able to adjust the phase shift. I used the PWM.h library to define the frequency and then analogWrite to change the duty cycle.
I was wondering if I could use delayMicroseconds, but that doesn't seen to work.
Do you guys have any idea about what I can do?
All help is appreciated.
Thank you all very much.