Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Philips Semiconductors Preliminary <strong>User</strong> <strong>Manual</strong><br />
ARM-based Microcontroller<br />
UART0 Scratch Pad Register (U0SCR - 0xE000C01C)<br />
<strong>LPC2131</strong>/<strong>2132</strong>/<strong>2138</strong><br />
The U0SCR has no effect on the UART0 operation. This register can be written and/or read at user’s discretion. There is no<br />
provision in the interrupt interface that would indicate to the host that a read or write of the U0SCR has occurred.<br />
Table 72: UART0 Scratch Pad Register (U0SCR - 0xE000C01C)<br />
U0SCR Function Description<br />
7:0 - A readable, writable byte. 0<br />
UART0 Baudrate Calculation<br />
Example 1: Using UART0 baudrate formula from above, it can be determined that system with pclk=20 MHz, U0DL=130<br />
(U0DLM=0x00 and U0DLL=0x82), DivAddVal=0 and MulVal=1 will enable UART0 with UART0 baudrate =9615 bauds.<br />
Example 2: Using UART0 baudrate formula from above, it can be determined that system with pclk=20 MHz, U0DL=93<br />
(U0DLM=0x00 and U0DLL=0x5D), DivAddVal=2 and MulVal=5 will enable UART0 with UART0 baudrate =9600 bauds.<br />
Table 73: Baud-rates using 20 MHz peripheral clock (pclk)<br />
Desired<br />
baud-rate<br />
U0DLM:U0DLL 1) % error 2) Desired<br />
baud-rate<br />
UART0 Transmit Enable Register (U0TER - 0xE0010030)<br />
Reset<br />
Value<br />
U0DLM:U0DLL 1) % error 2)<br />
50 25000 0.0000 4800 260 0.1600<br />
75 16667 0.0020 7200 174 0.2240<br />
110 11364 0.0032 9600 130 0.1600<br />
134.5 9294 0.0034 19200 65 0.1600<br />
150 8333 0.0040 38400 33 1.3760<br />
300 4167 0.0080 56000 22 1.4400<br />
600 2083 0.0160 57600 22 1.3760<br />
1200 1042 0.0320 112000 11 1.4400<br />
1800 694 0.0640 115200 11 1.3760<br />
2000 625 0.0000 224000 6 7.5200<br />
2400 521 0.0320 448000 3 7.5200<br />
3600 347 0.0640<br />
1) values in the row represent decimal equivalent of a 16-bit long content {DLM:DLL}<br />
2) refers to the percent error between desired and actual baud-rate<br />
LPC<strong>2132</strong>/<strong>2138</strong>’s U0TER enables implementation of software flow control. When TxEn=1, UART0 transmitter will keep sending<br />
data as long as they are available. As soon as TxEn becomes 0, UART0 transmittion will stop.<br />
UART0 97 November 22, 2004