I can't receive a letter using UART I wrote a simple program where I transmit and receive a letter via UART. The transmit function works 100% but the receive interrupt function doesn't work at all... Can someone adjust the receive interrupt function so I can receive a string instead of a char?

#define FOSC 16000000 // Clock Speed
#define BAUD 9600
#define MYUBRR FOSC/16/BAUD-1

void setup() {
  USART_Init(MYUBRR);
  interrupts();
}

void loop() {
}

void USART_Init(unsigned int ubrr) {
  /*Set baud rate */
  UBRR0H = (unsigned char)(ubrr&gt;&gt;8);
  UBRR0L = (unsigned char)ubrr;
  UCSR0B = (1&lt;&lt;RXEN0)|(1&lt;&lt;TXEN0);
  //Enable receiver and transmitter */
  UCSR0C = (1&lt;&lt;USBS0)|(3&lt;&lt;UCSZ00);
  /* Set frame format: 8data, 2stop bit */
  UCSR0A |= (1 &lt;&lt; RXCIE0);
  UCSR0C=0;
}
void USART_Transmit(unsigned char data) {
  /* Wait for empty transmit buffer */
  while(!( UCSR0A &amp; (1&lt;&lt;UDRE0)));
  /* Put data into buffer, sends the data */
  UDR0 = data;
}

ISR(USART__RXC_vect) {
  char ReceivedByte;
  ReceivedByte = UDR0;
  // Fetch the received byte value into the variable "ByteReceived"
}
ISR(USART__RXC_vect)
{  
  char ReceivedByte;
  ReceivedByte = UDR0; 
// Fetch the received byte value into the variable "ByteReceived"
}



USART__RXC_vect is not the name of the interrupt vector, USART_RX_vect is.

If you don't get the name right there is no compiler warning, however the interrupt routine is not called.




UCSR0A |= (1 &lt;&lt; RXCIE0);



That line is wrong. RXCIE0 is in UCSR0B not UCSR0A. If you set the bit in the correct register you will get an interrupt.