A professor I used to work with extensively asked me to help him with a research project. I need to toggle 2 pins with a 50% duty cycle at the same frequency but with an adjustable phase difference between them.
I've used Timer1 extensively to get this duty cycle and frequency range (for this project, I need about 0.25Hz to 60Hz) for previous projects, and getting 2 pins to toggle in phase or perfectly out of phase is pretty simple. I've never had to deal with any other phase shifts, though. My initial plans of having a timer call new TOP values from an array (cycling through the array and grabbing XOR masks for the appropriate port) each cycle won't be able to handle a 0 phase shift or a full cycle phase shift.
Any thoughts would be appreciated. If I can get this frequency generation problem solved, the rest of the research equipment is actually pretty straight forward.
Thanks in advance.