baud rate calculation

Mar 01, 2011 1 Replies

I am having a problem calculating the baud rate of 9600 bauds for ARM7 (LPC2148) at 12MHZ crystal. I have figured out a value of :



U1DLM=0x00; U1DLL=0x62;


following is my UART1 initialization code:



void init_UART1() {



PINSEL0=0x00050000; // FOR UART1 U1LCR=0x83; U1DLM=0x00; U1DLL=0x62; U1LCR=0x03; U1FCR=0x01; }



please help me if there is any other solution.....


--------------------------------------- Posted through

formatting link


this looks like a standard 16550, which needs a divisor to give you

16x the desired baud rate. 9600 x 16 =3D 153600. 12e6 / 153600 =3D 78.125, implies 0x4e would be the divisor. Note that async serial can usually tolerate some baud rate deviation as the receiver should resync on the start bit of every character.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required