Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

UART clock tolerance question.

UART clock tolerance question.

2005-12-15 by diwilru

Fellows,

In my application the best I can get is 115384 Baud for uart0 whereas data source has 
speed of 115200 exactly. The error is about 0.16%. The question is - will lpc (2148) 
handle it?

Thanks in advance, 
Dmitry.

Re: [lpc2000] UART clock tolerance question.

2005-12-15 by Sean

Generally speaking the tolerance for all RS232 devices is about 3%.  Some 
go higher, but most can handle 3%.  0.16% is almost certainly fine for any 
rs232 device.

At 04:48 AM 12/15/2005, you wrote:
Show quoted textHide quoted text
>Fellows,
>
>In my application the best I can get is 115384 Baud for uart0 whereas data 
>source has
>speed of 115200 exactly. The error is about 0.16%. The question is - will 
>lpc (2148)
>handle it?
>
>Thanks in advance,
>Dmitry.

Re: UART clock tolerance question.

2005-12-15 by Guillermo Prandi

Most likely it will. It is not exactly "if LPC will handle it", but 
more like whether the two parties will understand each other. In a 
perfect world, you just need to multiply a bit's time times the number 
of bits in your word (7, 8?) plus the start and the stop bits and see 
if the stop bit ends reasonably in range (bits are compared at their 
mid-point). Since the world is not so perfect, you must take into 
account the rise and fall ramps of your transmission line as well. If 
both devices are 3.3V or 5V and in the same board, you can reasonably 
ignore the rise and fall ramps, since they are so sharp.

Guille

--- In lpc2000@yahoogroups.com, "diwilru" <ddiky@a...> wrote:
>
> Fellows,
> 
> In my application the best I can get is 115384 Baud for uart0 whereas 
data source has 
> speed of 115200 exactly. The error is about 0.16%. The question is - 
will lpc (2148) 
Show quoted textHide quoted text
> handle it?
> 
> Thanks in advance, 
> Dmitry.
>

Re: [lpc2000] Re: UART clock tolerance question.

2005-12-15 by Karsten Weiss

Hellop Dmitry,
usually one says, that a tolerance of approx. 2% betreen the baud rate 
of two communicating devices will be acceptable in general.
Regards,
Karsten

Guillermo Prandi schrieb:
Show quoted textHide quoted text
>Most likely it will. It is not exactly "if LPC will handle it", but 
>more like whether the two parties will understand each other. In a 
>perfect world, you just need to multiply a bit's time times the number 
>of bits in your word (7, 8?) plus the start and the stop bits and see 
>if the stop bit ends reasonably in range (bits are compared at their 
>mid-point). Since the world is not so perfect, you must take into 
>account the rise and fall ramps of your transmission line as well. If 
>both devices are 3.3V or 5V and in the same board, you can reasonably 
>ignore the rise and fall ramps, since they are so sharp.
>
>Guille
>
>--- In lpc2000@yahoogroups.com, "diwilru" <ddiky@a...> wrote:
>  
>
>>Fellows,
>>
>>In my application the best I can get is 115384 Baud for uart0 whereas 
>>    
>>
>data source has 
>  
>
>>speed of 115200 exactly. The error is about 0.16%. The question is - 
>>    
>>
>will lpc (2148) 
>  
>
>>handle it?
>>
>>Thanks in advance, 
>>Dmitry.
>>
>>    
>>
>
>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>

Re: UART clock tolerance question.

2005-12-16 by Ken Wada

--- In lpc2000@yahoogroups.com, Sean <embeddedrelated@w...> wrote:
>
> 
> Generally speaking the tolerance for all RS232 devices is about 3%.  
Some 
> go higher, but most can handle 3%.  0.16% is almost certainly fine 
for any 
> rs232 device.
Interesting; your number...> 3%. The 16C550 UART statemachine uses a 
16x over-sampling statemachine for detecting the NRZ bit-frame, 
(start/stop + each data bits). Given this, we have a 1/16 per bit 
frame detection that is used by the 16C550 silicon. This gives us a 6.
25% per state detection for the UART.

So...if we say that for adequate and reliable bit-frame detection, we 
require at least 1/2 an LSB for bit-acquisition, this gives us a value 
of 1/32 which equals 3.125%, which is very close to your number.

Now...these are numbers that are valid for the 16C550 IP. Other 
16C550, or for that matter, 8250 compatible UARTs, in general may not 
use the same detection methods that were pioneered by National 
Semiconductor.

Therefore, be very careful about UART clock frequencies, some PC's and 
devices may be ok, and others not! Some of those clone PC's are really 
picky and cannot tolerate any deviations!

Ken Wada

> 
> At 04:48 AM 12/15/2005, you wrote:
> >Fellows,
> >
> >In my application the best I can get is 115384 Baud for uart0 
whereas data 
> >source has
> >speed of 115200 exactly. The error is about 0.16%. The question is 
- will 
Show quoted textHide quoted text
> >lpc (2148)
> >handle it?
> >
> >Thanks in advance,
> >Dmitry.
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.