AnsweredAssumed Answered

Serial communications Approach

Question asked by Karthik Sukumar on Aug 3, 2010
Latest reply on Aug 4, 2010 by Karthik Sukumar

 

I had to fiddle around with the SCI a bit and  wanted to know something.

 

This is what my serial code looks like (I am not using interrupts here).

       
       while(SCI1S1_TC == 1)
       {
       }

 

SCI1D = i;              
while(SCI1S1_TC == 1)      

{       }

 

and in the main for loop i have

 

 

for( ; ; ) 

  {       

          LCD_write('y');

          LCD_write('o');

    

    /* __RESET_WATCHDOG(); by default, COP is disabled with device init. When enabling, also reset the watchdog. */

  } /* loop forever */

 

LCD_write() is the function that contains the first piece of code.

 

Now I did notice on the LCD screen that it displayed a series of y's followed by a series of o's ! as opposed to series of yo's continuously !

 

This has led me to think that I am using the wrong approach to serial communication here. So please tell me if i am actually missing something out ? like the transmit buffer or something of that sort. Also I wanted to know what your approach to this would be like?

 

Please advice.

 

Cheers

Karthick

Outcomes