Dear all, I am new to LPC2378..Currently i am developing code for sending a character in serial port....Below i mentioned the code what i have written..but this is not working...i am using keil uvision4...Can anybody help me in this code????
This is my code...
#include <LPC23xx.H> #include <stdio.h> void delay(int); int main (void) { PCONP |= 0x00000010; PCLKSEL0 |= 0x00000300; PINSEL0 |= 0x40000000; /* Enable TxD1 */ PINSEL1 |= 0x00000001; /* Enable RxD1 */ U1LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ U1DLM = 0x00; U1DLL = 0x34; /* 9600 Baud Rate @ 12MHz Clock */ U1FDR = 0x21; /* U1FDR[[7:4]=MULVAL,U1FDR[[3:0]=DIVADDVAL,for baud rate generation */ U1LCR = 0x03; /* DLAB = 0 */ U1FCR = 0x07; /* enable TX amp RX FIFO ,clears TX amp RX FIFO */ while(1) { U1THR = 'A'; while (!(U1LSR && 0x20)); } }