We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, firstly i am sorry my bad engilsh.
I have LPC2378. I write my code. I dont understand where is my problem..Help me please.
Xtal=16Mhz Baudrate=9600
I have DOcklight program. I want to see what I am writing in this program at Docklight ASCII screen.
my UART input/output P0.2 and P0.3
and last question is; #define TEMT (1<<6) #define LINE_FEED 0xA #define CARRIAGE_RET 0xD
what do these mean?
****************************
#include <stdio.h> #include <LPC23xx.H>
void Initialize(void);
#define TEMT (1<<6) #define LINE_FEED 0xA #define CARRIAGE_RET 0xD
int main() { int i; char c[]="Digital Tanima Sistemleri";
Initialize();
while(1) { i=0;
while(c[i]) { U0THR=c[i]; i++; } U0THR=LINE_FEED; U0THR=CARRIAGE_RET;
/* Wait till U0THR and U0TSR are both empty */ while(!(U0LSR & TEMT)){} //?? } }
void Initialize() { PINSEL0=0x50; U0FCR=0x7; U0LCR=0x83; U0DLL=0x00000067; U0DLM=0x0; U0LCR=0x3; }
I am using debugger. I can see correct chars at UART1. But I can not see any chars at Docklight. I dont understand where is my fault. I read all documantation. But i dont solve the problem. I see only some characters ASCII screen at Docklight.
I want to see that what i am wrote.
Where do your debugger see if you have the correct baudrate on the actual cable?
Your code is not fun to read since you posted it without proper indentation.
But an interesting thing is - how many characters can you give the UART without checking if there are room for more? What does the user manual for the processor say? A hint - have you read the descriptions about the U0LSR register in the processor user manual?