WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

UART

Routines for handling serial communications with other devices by using UARTs.
If you run out of hardware UARTs you can use software UARTs instead to simulate a UART in code. Obviously software simulation cannot cope with very high baud rates and this will depend on the clock speed of your processor, the required baud rate, and how 'busy' your micro-controller is.
The UART is automatically initialised to the specified baud rate.
In Project Designer you can specify the size of the transmit and receive buffers.
A transmit buffer of size 0 will mean that when you send any information to the UART then your program will wait until everything except the last byte have been sent out. If you would prefer the data to be sent out in the background, ie your program doesn't wait, then set the transmit buffer to the longest message length that you send at a time.
If you are expecting to receive data via the UART then set the receive buffer size to the length of the longest message you expect to receive (as a guideline). If you fail to read the data out of the receive buffer faster than it is being received you will get an overflow error - in which case try increasing the size of the receive buffer. In some cases it can be that the receive buffer is overflowing due to the program having to 'wait' whilst transmitting in which case it could be better to increase the size of the transmit buffer.
Function Summary

Valid XHTML 1.0 Transitional