csnsc14320
New Member
I have a 1Hz square wave that I would like to add a variable delay between 1 microsecond to 1 second (1,000,000 microseconds).
The idea is this:
- The input 1Hz square wave rises
- After X amount of microseconds (where X is chosen before hand, between 1-1million microseconds), output HIGH.
Basically I want to phase shift the 1Hz signal by a specified time. From there, I would like to be able to determine when the output stops giving HIGH (ie. while the square wave will give out HIGH for .5 seconds then LOW for .5 seconds, I may only want the output to output high for say .2 seconds, then drop back to low until the 1Hz wave goes from LOW to HIGH again).
The output will be run through an LED, which will represent the delayed signal. A photo detector will then record when the LED goes off to verify that the delay is correct.
Anyone have any ideas with this?
I would assume to do it with hardware such as flip flops and counters would be a pain to get the "variable" delay aspect, so I am leaning towards a microcontroller. I have been experimenting with an Arduino with a 16Mhz clock but I don't think that will be able to do the job anymore
The idea is this:
- The input 1Hz square wave rises
- After X amount of microseconds (where X is chosen before hand, between 1-1million microseconds), output HIGH.
Basically I want to phase shift the 1Hz signal by a specified time. From there, I would like to be able to determine when the output stops giving HIGH (ie. while the square wave will give out HIGH for .5 seconds then LOW for .5 seconds, I may only want the output to output high for say .2 seconds, then drop back to low until the 1Hz wave goes from LOW to HIGH again).
The output will be run through an LED, which will represent the delayed signal. A photo detector will then record when the LED goes off to verify that the delay is correct.
Anyone have any ideas with this?
I would assume to do it with hardware such as flip flops and counters would be a pain to get the "variable" delay aspect, so I am leaning towards a microcontroller. I have been experimenting with an Arduino with a 16Mhz clock but I don't think that will be able to do the job anymore