title: Convert two ASCII Hexadecimal Characters (Two ASCII bytes) in one byte
body: <p>I want to convert two ASCII bytes to one hexadecimal byte.
  eg. </p>
  
  <p><code>0x30 0x43 =&gt; 0x0C , 0x34 0x46 =&gt; 0x4F</code> ...</p>
  
  <p>The ASCII bytes are a number between <code>0</code> and <code>9</code> or a letter between <code>A</code> and <code>F</code> (upper case only), so between <code>0x30</code> ... <code>0x39</code> and <code>0x41</code> ... <code>0x46</code></p>
  
  <p>I know how "to construct" <code>0x4F</code> with the numbers <code>0x34</code> and <code>0x46 : 0x4F = 0x34 * 0x10 + 0x46</code></p>
  
  <p>So, in fact, i would to convert one ASCII byte in hexadecimal value.</p>
  
  <p>For that, i can build and array to assign the hexadecimal value to the ASCII char :</p>
  
  <pre><code>0x30 =&gt; 0x00
  0x31 =&gt; 0x01
  ...
  0x46 =&gt; 0x0F
  </code></pre>
  
  <p>But, maybe it have a most « proper » solution.</p>
  
  <p>The program will be run on an AVR µC and is compiled with <code>avr-gcc</code>, so <code>scanf()</code> / <code>printf()</code> solutions aren't suitable.</p>
  
  <p>Have you got an idea ?
  Thanks</p>