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.
I am using printf statement in my projerct using PK 51 compiler for the target P89C668. But i found some trouble in it.
My code is,
void main(void) { SCON = 0x50; TMOD = 0x20; TH1 = 0xFD; TL1 = 0x00; TR1 = 1; SBUF= ' '; puts("\n Hello World"); TI = 0; SBUF=' '; printf("\n hai"); TI = 0; while(1); }
The puts statement works with serial port but the printf statement is running infinitely i dont know the reason for it.
but this one works with the previous of uVision 2.
can anybody what is the problem in the program.