Ok, so I am having major issues. I have spent several hours attempting this, seemingly simple problem...
This is what I am trying to do:
I am trying to create a program that receives a square wave synch input at 40khz. From here, I am trying to detect the beginnning of the positive flat portion of the square wave. From here, I need a for loop that recognizes the beginning of the positive flat portion, then outputs a short pulse at this point.
However, there is a trick.... I need the first output pulse to be right at the beginning, then the second output pulse to be output at about 1/4 of the way through the positive portion of the square wave, then the third to be about 1/2 way through... and so on and so on.
Any help would be great. I know there is something that I missing big time. Because I really should be able to do this in about 10 minutes.