Amruta (talk) 13:22, 17 March 2015 (IST)
Contents
[hide]Basics
LPC1768 has 4 UARTS out of which UART0, UART2, UART3 are very similar while UART1 is little bit different from all these.
Registers
Let's have a brief review through some of the important UART registers.
RBR ( Receiver Buffer Register )
THR ( Transmit Holding Register )
DLL ( Divisor Latch LSB register )
DLM ( Divisor Latch MSB register )
FCR ( FIFO Control Register )
LCR ( Line Control Register )
LSR ( Line Status Register )
Schematic
Code
Let's make a Decimal Counter with UART .
Initialize the UART0 with 9600 baud-rate.
Display the initial message and go on displaying incremented count taking some pause.
To know more about UART library, check this.
- #include "lpc17xx.h" //Device specific header file
- #include "uart.h" //Explore Embedded UART library which contains the uart routines
- #include "delay.h" //Explore Embedded library containing the delay routines
- /* start the main program */
- int main()
- {
- uint16_t cnt=0;
- /* Setup and initialize the microcontroller system */
- SystemInit();
- /* Initialize the UART before Transmitting/Receiving any data */
- UART_Init(UART0,9600);
- UART_Printf("5digit decimal counter: ");
- /* Transmit the counter till 9999 */
- while(cnt < 9999)
- {
- /* Transmit the 4-digit counter value and go to next line */
- UART_Printf("\n\r%4u",cnt);
- /* Increment the counter value after 1-sec */
- DELAY_sec(1);
- cnt++;
- }
- while(1);
- }

CoIDE with ARMGCC for ARM Development
Amruta (talk) 10:30, 10 March 2015 (IST) Intro Welcome to the world of ARM Microcontrollers. In this tutorial, we will look at setting up free and open-source tools for ARM Development...

Setting up Keil for ARM
Amruta (talk) 19:22, 11 March 2015 (IST) Sample Project for LPC1768 Let’s start with a simple LED blinking program. Launch the Keil application and follow the steps below...

ARM Timer Programming
Amruta (talk) 13:24, 17 March 2015 (IST) Basics Schematic Code /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW...

ARM Interrupt Programming
Amruta (talk) 13:25, 17 March 2015 (IST) Basics Schematic Code /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW...