title: Displaying ASCII characters from an array on a LCD with ATmega32
body: <p>I've got an LCD, connected to an Atmega32, working with single characters using this function:</p>
  
  <pre><code>void send_char(uint8_t c){
      PORTD = c; // set the output pins to the ascii value of the char
      PORTB |= 0x05;
      _delay_us(1);
      PORTB &amp;= 0xfa;
      _delay_us(60);
      PORTD = 0x00;
      update_cursor();
  }
  </code></pre>
  
  <p>I can call this with a character as an argument: <code>send_char('a');</code> and it works.</p>
  
  <p>Then I tried wrapping a send_string function around it:</p>
  
  <pre><code>void send_string(const char * msg){
      while (*msg != '\0'){
          send_char(*msg++);
      }
  }
  </code></pre>
  
  <p>This just puts gibberish on my LCD indicating that the ASCII value has been far off. And when I try passing an empty string (<code>send_string("")</code>) a minimum of three gibberish characters get displayed on the LCD.</p>