Changing the baud rate on LPC54102

Questions on UARTs, and serial communication
Post Reply
basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Changing the baud rate on LPC54102

Post by basicchip »

The UARTs of the LPC54102 share the same baud rate clock. By default UART0 is setup for 115Kb.

The proper way to change the baud rate for other UARTs is to first set it to 115Kb, then poke the BRG register

Code: Select all

#define UART2_BRG	*(&H4008C020)

BAUD(2)=115200

UART2_BRG = 77		'  12 MHz PCLK / 9600baud / 16 - 1
for i=0 to 9
  txd(2)=&H30+i
  wait(1000)
next



Post Reply