When trying to compile for the first time I got this:
So in USART.c I change "UBR0H" to "UBRH", "UBR0L" to "UBRL" etc. until the code compiled. But when I finally got to actualy using the USART I had to make one last tweak before the serialLoopback.c code worked.
Change:"UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);"
to: " UCSRC = (1 << UCSZ1) | (1 << URSEL) | (1 << UCSZ0); "
This is because you need to set the URSEL bit when you write to the UCSRC register.
When trying to compile for the first time I got this: So in USART.c I change "UBR0H" to "UBRH", "UBR0L" to "UBRL" etc. until the code compiled. But when I finally got to actualy using the USART I had to make one last tweak before the serialLoopback.c code worked. Change:"UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);" to: " UCSRC = (1 << UCSZ1) | (1 << URSEL) | (1 << UCSZ0); " This is because you need to set the URSEL bit when you write to the UCSRC register.