This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Baud rate HELP............

I am using LPC 1114,with 12Mhz crystal frequency...

How can I get 9600 baud rate .....?

Please tell me how to use clock sources to get that baud rate?

Parents
  • Is this correct:

     LPC_SYSCON->UARTCLKDIV = 0x2;                /* divided by 1 */
    
    LPC_UART->LCR = 0x83;                /* DLB=1, 8 bits, no Parity, 1 Stop bit */
    regVal = LPC_SYSCON->UARTCLKDIV;
    
    Fdiv = (((12000000/1)/regVal)/16)/baudrate ;    /*baud rate */
    

    if LPC_SYSCON->UARTCLKDIV = 0x2 means a division by 1, are you then sure that Fdiv = (((12000000/1)/regVal)/16)/baudrate ; will not compute a factor two wrong, since regVal will contain the value 2 and not the value 1.

Reply
  • Is this correct:

     LPC_SYSCON->UARTCLKDIV = 0x2;                /* divided by 1 */
    
    LPC_UART->LCR = 0x83;                /* DLB=1, 8 bits, no Parity, 1 Stop bit */
    regVal = LPC_SYSCON->UARTCLKDIV;
    
    Fdiv = (((12000000/1)/regVal)/16)/baudrate ;    /*baud rate */
    

    if LPC_SYSCON->UARTCLKDIV = 0x2 means a division by 1, are you then sure that Fdiv = (((12000000/1)/regVal)/16)/baudrate ; will not compute a factor two wrong, since regVal will contain the value 2 and not the value 1.

Children