i can not simulate in proteus this code correctly. what is wrong with this code? i am new on atmega168 and i want to use usart interrupt.
void uart_init(void){
UBRR0 = 416;
//UBRR0H = 0;
//UBRR0L = 207;
UCSR0B |= (1 << RXEN0) | (1 << TXEN0);
UCSR0C=(0<<UMSEL00)|(0<<UMSEL01)|(0<<UPM01)|(0<<UPM00)|(1<<USBS0)|(0<<UCSZ02)|(1<<UCSZ01)|(1<<UCSZ00);
UCSR0A |=(1<< RXC0);
UCSR0B |=(1 << RXCIE0);
sei();
}
ISR(USART0_RXC_vect){
char ReceivedByte;
ReceivedByte = UDR0;
PORTC = UDR0;
}