title: Hex to NSString with scaling 0x40 bytes
body: <p>Second day trying to get the character from byte value which was scaled by 0x40 bytes</p>
  
  <p>I'm trying to get hex value from Logic Pro/Mackie Control. </p>
  
  <p>Logic sends me 0xE, it mean this is 'n'. If it sends me '4e' it mean I should draw on the display 'n.' (simply add dot at the end). </p>
  
  <p>Here is formula for converting char to byte. Please help me made vice versa formula. </p>
  
  <pre><code>char translate_seven_segment( char achar )
  {
      achar = toupper( achar );
      if ( achar &gt;= 0x40 &amp;&amp; achar &lt;= 0x60 )
          return achar - 0x40;
      else if ( achar &gt;= 0x21 &amp;&amp; achar &lt;= 0x3f )
          return achar;
      else
          return 0x00;
  }
  
  char s = 'N';
      Byte ad = translate_seven_segment( s ) + ( '.' == '.' ? 0x40 : 0x00 );
  </code></pre>
  
  <p>I found also following code (this seems without topper()):</p>
  
  <pre><code>def translate_seven_segment( char )                      
      case char                                       
        when 0x40..0x60                                   
          char - 0x40                                     
        when 0x21..0x3f                                    
          char                                         
        else                                        
          0x00                                         
      end                                        
    end   
  </code></pre>
  
  <p>How I can reverse it ? I know mackie use this code to build hex from char. But I need vise versa, is to get char from hex.</p>