Sep 23, 2009 #1 B bandaru_sivakrishna Newbie level 2 Joined Sep 29, 2007 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,294 #include <LPC213X.H> void delay(int); int main() { unsigned long temp; unsigned char a; PINSEL0 = 0x5; U0LCR = 0x83; U0DLL = 0x61; U0DLM = 0x00; U0LCR = 0x03; while(1) { while (!(U0LSR & 0x01)); //receive condition a = U0RBR; delay(10); while (!(U0LSR & 0x20)); //transmit condition U0THR = a; } } void delay(int x) { unsigned int i,j; for(i=0;i<x;i++) for(j=0;j<113;j++); } this code works
#include <LPC213X.H> void delay(int); int main() { unsigned long temp; unsigned char a; PINSEL0 = 0x5; U0LCR = 0x83; U0DLL = 0x61; U0DLM = 0x00; U0LCR = 0x03; while(1) { while (!(U0LSR & 0x01)); //receive condition a = U0RBR; delay(10); while (!(U0LSR & 0x20)); //transmit condition U0THR = a; } } void delay(int x) { unsigned int i,j; for(i=0;i<x;i++) for(j=0;j<113;j++); } this code works