EmbeddedRelated.com
Forums

baud rate calculation for lpc210x

Started by aravindar_manikandan November 5, 2004

hi,

i am using 14.746Mhz crystal for lpc210x.i want to find baudrate
setting for this crytal frequency.anybody explain with the formula

rgds,
mani




An Engineer's Guide to the LPC2100 Series

hi
here is the uart baud rate calculation

Baudrate=(ProcessorClock)/(16*BaudDivider Reg)

if you are using 14.7456MHz crystal and not using
Internal PLL of the lpc and processor clock is div
4
HERE IS THE FORMULA

BAUDRATE=(14.7546MHz/4)/(16*(BaudDivider Reg))
i.e for 14400 Baudrate
14.7456MHz/(4*16*16)
BaudDivider Reg

if you are using PLL say it is 4 times the Crystal
Frequency

BAUDRATE=(14.7546MHz*4)/(16*(BaudDivider Reg))
i.e for 14400 Baudrate
14.7456MHz*4/(16*256)
BaudDivider Reg%6 ie LowBaudReg=0 HighBaudReg=1

hopes it will help you shridhar

--- aravindar_manikandan
<> wrote:

>
> hi,
>
> i am using 14.746Mhz crystal for lpc210x.i want to
> find baudrate
> setting for this crytal frequency.anybody explain
> with the formula
>
> rgds,
> mani >
>

__________________________________


At 06:14 PM 11/5/04 +0000, you wrote:
>i am using 14.746Mhz crystal for lpc210x.i want to find baudrate
>setting for this crytal frequency.anybody explain with the formula

Well it will depend on the pll and vpb settings as well as the crystal speed.

Basically

divisor = vpbrate/(baud *16);

U0DLM = high 8 bits of divisor
U0DLL = low 8 bits of divisor

There is a generalized version in the uart driver in the lpc-newlib .

Robert

" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "

Kelvin Throop, III