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)); } }
Where is the code?
Ooops - that random noise of characters at the end of the post was intended to be code? Did you see the information directly above the message input box about how to format your source code? Try again - no one will attempt to read your "code" unless it is posted in a way that maintains reasonable indentation and that have the line breaks at logical places.
Sorry..I started new thread...
Why??
Why not just continue in this one?
Anyhow, since you have, you should provide a link to it: http://www.keil.com/forum/18811