You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: