The UART communicates at a agreed upon speed set by the baud rate. This baud rate must be set in both the transmitting and receiving microcontrollers to work.
//Set the UBBR value
int UBBRValue = 25;
/Put the upper part of the baud number here (bits 8 to 11)
UBRR0H = (unsigned char) (UBBRValue >> 8);
//Put the remaining part of the baud number here
UBRR0L = (unsigned char) UBBRValue;
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.