title: atmega8 UART- doesn't show character in realterm
body: <p>Hi i'm new to this and i need help. It's suppose to just show the 'S' in the realterm instead it gives 'null'. What would be the problem? could it be the register? or the code itself? </p>
  
  <pre><code>#include &lt;avr/io.h&gt;
  #include &lt;util/delay.h&gt;
  
  void UART_Init(unsigned int ubrr)
  {
      UBRRH=(unsigned int)(ubrr&gt;&gt;8);
      UBRRL=(unsigned int)ubrr;
      UCSRA=0x00;
      UCSRB=(1&lt;&lt;TXEN)|(1&lt;&lt;RXEN);
      UCSRC=(0&lt;&lt;USBS)|(1&lt;&lt;UCSZ0)|(1&lt;&lt;UCSZ1);
  }
  
  void UART_Tx(unsigned char chr)
  {
      while (bit_is_clear(UCSRA,UDRE)){}
      UDR=chr;
  }
  
  int main(void)
  {
      UART_Init(95);
      DDRD|=0B11111111;
      PORTD|=0B11111111;
  
      while(1){
          _delay_ms(10);
          UART_Tx('S');
      }
  }
  </code></pre>
  
  <p>System is running on xtal with 14745600 Hz. Speed on host is 9600 baud. all settings should be 8N1.</p>