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

Intialzing both UARTs

Hi , I'm newbee to ARM controller family.I'm trying to Receive a Message from GPS(Global Positioning System) and Sending to an GSM modem.

I'M using LPC2148 controller. My freq for controller is 12MHz.
I need Help on how to intialize both the UARTs.

My code for Intilization is written as fallows,

void SerialInit1 (void)            // this intialization for transmitting a msg to GSM modem
{
        PINSEL0 = 0x00050000;            // Enable RxD1 and TxD1 (for UART1)
        U1LCR   = 0x00000083;             // 8 bits, no Parity, 1 Stop bit
        U1DLL   = 0x000000C2;             // 9600 Baud Rate @ 30MHz VPB Clock
        U1LCR   = 0x00000003;             // DLAB = 0
}

void SerialInit0 (void)         // this intialization for receiving msg from GPS
{
        PINSEL0 = 0x00000005;            // Enable RxD1 and TxD1 (for UART1)
        U0LCR   = 0x00000083;             // 8 bits, no Parity, 1 Stop bit
        U0DLL   = 0x000000C2;             // 9600 Baud Rate @ 30MHz VPB Clock
        U0LCR   = 0x00000003;             // DLAB = 0
}

I doubt this is not the the proper way of intializing the Both UARTs..Can someone throw light on it?

Thank you
Regards,
Kush