I've been trying to debug this program. I am using an ATmega328p My USART trigger isn't getting called? Maybe I'm missing something?
Hardware using PuTTY to send message or simply echo 1> COM1
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/setbaud.h>
#ifndef BAUD
#define BAUD 9600
#endif
int main(void) {
DDRB = 0x1;
UCSR0B = (1 << TXEN0) | (1 << RXEN0) | ( 1 << RXCIE0 );
UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);
UBRR0H = UBRRH_VALUE;
UBRR0L = UBRRL_VALUE;
sei( );
while (1) { }
return (0);
}
ISR( USART_RX_vect ) {
PORTB ^= 0x1;
}