[quote author=Coding Badly link=topic=64678.msg472020#msg472020 date=1308765281]
When it does go from low to high, I want to be able to tell it to do some function, such as counting the number of 10MHz square wave pulses it has received (ie start a counter), and have the arduino put out HIGH to another pin after X amount of pulses.
With the processor running at 16 MHz, the highest frequency that can reliably be processed is 8 MHz (Nyquist was a smart dude).
To count the pulses you will have to configure one of the timers to use an external clock source. Assuming I follow the datasheet correctly, you can use timer 0 or timer 1.
The timer can be configure to set one of its output pins high on an output compare.
Drop the frequency to 8 MHz and spend some time with the datasheet and you'll have a solution.
The 10MHz signal I was inputting to the Arduino is from a clock generator, so I could try using that.
OK, so here is what I am ultimately trying to do. I have a 1 Hz square wave that I will be feeding into the arduino. Every time that it rises, I want to set another pin HIGH after a certain amount of microseconds. I need microsecond resolution so that I can specify to delay the output anywhere from say 1 microsecond up to 1 second. In essence, I am trying to delay the square wave with microsecond precision (hence the 10MHz clock).
The output pin that I am delaying will be used to power a small external LED that will represent the delayed square wave.