Loading ...
Sorry, an error occurred while loading the content.
 

problem with Usart pls help........

Expand Messages
  • v.sandeep_kumar
    hello friends iam new to AVR and iam trying to learn using small programs. iam using atmega16 micr-cont for this purpose. i wrote this program to display a
    Message 1 of 1 , May 12, 2008
      hello friends iam new to AVR and iam trying to learn using small programs. iam using
      atmega16 micr-cont for this purpose. i wrote this program to display a number assigned to a
      variable ,but the o/p in the terminal(Baud rate 9600) is showing just spaces or some times
      just jumping to new line with out any data printing on screen. here's the program please do
      help.i expected it to print 10 but i cant debug it..

      #include<avr/io.h>
      int main(void)
      {
      int i=10;
      UCSRC=0b10000110;
      UBRRL=51;
      UCSRB=0b00001000;
      UDR=i;
      while(!(UCSRA&0b00100000))
      {
      }
      UCSRB=0b00000000;
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.