user10186: I want my arduino to give the output at a specified delay .The delay is calculated from a polynomial equation. 
unsigned long t=40*Vin*Vin-760*Vin+4320; 
delay(t);
digitalWrite(ledPin,HIGH);

but while doing this i was unable to get the delay accurately while observing it through oscilloscope??

user8616: I suggest you look into using a hardware timer rather than using delay(), I suspect it will give you more accurate timing.
Timer configuration is not as straight forwards as using delay - they don't work in milliseconds or microseconds, but instead in multiples of clock cycles, which (I find) makes configuring them a little difficult to understand, but it is possible to set the interval of a timer within its own interrupt routine.
Another advantage to using timers is that your code can do other things whilst waiting between interrupts.
Have a read here for more information and simple examples:
http://playground.arduino.cc/code/timer1
or just Google "Arduino timers" for other examples and explanations.

10186: <p>I want my arduino to give the output at a specified delay .The delay is calculated from a polynomial equation. </p>

<pre><code>unsigned long t=40*Vin*Vin-760*Vin+4320; 
delay(t);
digitalWrite(ledPin,HIGH);
</code></pre>

<p>but while doing this i was unable to get the delay accurately while observing it through oscilloscope??</p>
 8616: <p>I suggest you look into using a hardware timer rather than using delay(), I suspect it will give you more accurate timing.</p>

<p>Timer configuration is not as straight forwards as using delay - they don't work in milliseconds or microseconds, but instead in multiples of clock cycles, which (I find) makes configuring them a little difficult to understand, but it is possible to set the interval of a timer within its own interrupt routine.</p>

<p>Another advantage to using timers is that your code can do other things whilst waiting between interrupts.</p>

<p>Have a read here for more information and simple examples:
<a href="http://playground.arduino.cc/code/timer1" rel="nofollow">http://playground.arduino.cc/code/timer1</a>
or just Google "Arduino timers" for other examples and explanations.</p>
