calculating time delay

If we are generating a pulse using Arduino Uno and triggering the data capture at A0 pin (the analog input) with reference to the pulse, is there a way to determine the delay between the trigger pulse high and the A0 pin and incorporate this delay in subsequent data capture cycles.

Our data would be in the range of 3-5 V at A0, probably we can use rising edge as the indicator.

Are you reading an analog value or a digital value on pin A0 (both are possible) ?

You have provided no indication of the size of time interval that you want to measure or how accurately you wish to measure it.

Maybe you can record the value of micros() when the pulse is created and record it again to a different variable when the input is detected. Then subtract the first value from the second to get the interval.

It will be much easier to give useful advice if you explain what your project is.

...R

You can get 9615 samples per second using the analogRead function. That means each one takes 104 uS.

Grumpy_Mike: You can get 9615 samples per second using the analogRead function. That means each one takes 104 uS.

... But bear in mind that's only if the processor isn't doing anything else, unless you do a minor rewrite of analogRead to remove the busy-wait

You may write the program so that the time can be determined. You have to make sure the time between trigger and ADC starting is not interrupted. Then you can either measure the delay or count cycles in disassembly of the program.

Grumpy_Mike: You can get 9615 samples per second using the analogRead function. That means each one takes 104 uS.

I don't think it is safe to assume that analogRead() is relevant. We need a lot more info from the OP.

...R

is there a way to determine the delay between the trigger pulse high and the A0 pin

Yes

and incorporate this delay in subsequent data capture cycles.

Yes - but this delay is so small in comparison to the length of time it takes to measure the sample from the analogue to digital converter that it is insignificant.