Anyone able to communicate with the RS232 on AVR 2560?
I have made some setup, but seems like I never get the RX complete interrupt (USART0_RX_vect).
I am using the Hyperterminal on the PC side, connected to the avr2560 using RS232 on COM1.
My setup is following:
/* Set baud rate */
UBRR0H = (unsigned char)(baudrate>>8);
UBRR0L = (unsigned char) baudrate;
/* Enable USART receiver and transmitter and receive complete interrupt */
UCSR0B = _BV(RXCIE0)|(1<<RXEN0)|(1<<TXEN0);
/* Set frame format: asynchronous, 8data, no parity, 1stop bit */
UCSR0C = (1<<URSEL0)|(3<<UCSZ00);
UCSR0C = (3<<UCSZ00);