title: Assign delays for 1 ms or 2 ms in C?
body: <p>I'm using code to configure a simple robot. I'm using <a href="http://winavr.sourceforge.net/" rel="nofollow">WinAVR</a>, and the code used there is similar to C, but without <code>stdio.h</code> libraries and such, so code for simple stuff should be entered manually (for example, converting decimal numbers to hexadecimal numbers is a multiple-step procedure involving <a href="http://en.wikipedia.org/wiki/ASCII" rel="nofollow">ASCII</a> character manipulation).</p>
  
  <p>Example of code used is (just to show you what I'm talking about :) )</p>
  
  <pre><code>.
  .
  .
      DDRA = 0x00;
      A = adc(0); // Right-hand sensor
      u = A&gt;&gt;4;
      l = A&amp;0x0F;
      TransmitByte(h[u]);
      TransmitByte(h[l]);
      TransmitByte(' ');
  .
  .
  .
  </code></pre>
  
  <p>For some circumstances, I must use WinAVR and cannot external libraries (such as <code>stdio.h</code>). ANYWAY, I want to apply a signal with pulse width of 1&nbsp;ms or 2&nbsp;ms via a servo motor. I know what port to set and such; all I need to do is apply a delay to keep that port set before clearing it.</p>
  
  <p>Now I know how to set delays, we should create empty for loops such as:</p>
  
  <pre><code>int value= **??**
  for(i = 0; i&lt;value; i++)
      ;
  </code></pre>
  
  <p>What value am I supposed to put in "value" for a 1&nbsp;ms loop ?</p>