Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

UART1 receive buffer

UART1 receive buffer

2004-06-09 by chrisatwan2000

I am trying to set up my code so that when I receive any character 
into UART1 then I transmit all the character and display them in the 
codevision terminal after I hit the <CR>.  Here is my function, I am 
not transmitting any of the received characters.

interrupt [USART1_RXC] void uart1_rx_isr(void)
{
char status,data;
GetScanner();

void GetScanner(void)
{
char i;
string_buffer[0] = UDR1;
if (string_buffer[0] == 13)
   {
   for (i = 0; i < 24; ++i)
      {
      string_buffer[i] = getchar1();
      printf("&d\n\r",string_buffer[i]);
      }
      string_buffer[i] = 0;  // null-terminate
   }
}

Chris Atwan

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.