AIM104-COM8 Technical Manual
Appendix C – Notes on using the 16C550 UART
© 2007 Eurotech Ltd Issue C
22
The timeout period, expressed in the number of characters can be calculated using the
following equation:
(4 x n
Char
) + 12
T =
(n
Parity
+ n
Char
+ n
Stop
+1)
Where:
n
Char
is the number of programmed bits per character (5, 6, 7 or 8)
n
Parity
is the number of programmed parity bits (1 unless no parity)
n
Stop
is the number of stop bits (1 ,1½ or 2)
The actual time for the timeout is simply defined as:
(4 x n
Char
) + 12
t =
F
Braud
where:
F
Baud
is the baud rate.
For example, communications at 9600 baud, 8 data bits, no parity, and 1 stop bit have
the following timeout period:
(4 x 8) + 12
44
T =
=
= 4.4
chars
0 + 8 + 1 + 1
10
(4 x 8) + 12
44
t =
=
= 4.58
ms
9600
9600
This timeout can significantly impact on the performance of the serial communications
within an application. If your serial communications is single character oriented, it is
better to set the FIFO trigger point lower and handle more frequent receive interrupts. If
your application transfers large blocks of data it is likely to be better to set the FIFO
trigger point higher.
Remember that the FIFO trigger point does not define the size of the FIFO; characters
are still received after the trigger has been activated until all sixteen positions in the
FIFO have been filled.