I'm little confused about the baud rate calculating equation of LPC2148
In data sheet equation is
But in every tutorial I could find
equation is
Second equation sets the baud rate as required.
Am I missing something?
Tutorials that I checked
I'm little confused about the baud rate calculating equation of LPC2148
In data sheet equation is
But in every tutorial I could find
equation is
Second equation sets the baud rate as required.
Am I missing something?
Tutorials that I checked
The only thing that makes sense is that the equation in the datasheet has an error.
That same datasheet says:
The U0DLL and U0DLM registers together form a 16 bit divisor where U0DLL contains the lower 8 bits of the divisor and U0DLM contains the higher 8 bits of the divisor
That suggests it should be 256*DLM+DLL
as written in tutorials. In example tables below, it's also treated as 16-bits altogether (upper 8 + lower 8).
Note that April 2012 version of datasheet [1] contains the corrected equation.
1<<8
or 2**8
, which is 256.
\$\endgroup\$