not able to use printf statement in keil uvision 4
printf() is not a statement - it is a function.
this is the code for GSM , if i debug i am not able to run in debug mode and it is not displaying message on Serial window
#include <lpc214x.h> #include <stdio.h>
unsigned int i;
//Serial Port Initialize void serial_init(void) { PINSEL0 = 0x05; /* Enable RxD0 and TxD0 */ U0LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ U0DLL = 0x61; /* 9600 Baud Rate @ 15MHz VPB Clock */ U0LCR = 0x03; /* DLAB = 0 */ U0IER = 0x01; /*Enable Interrupt Register */ }
//Delay Routine start here void delay1(int n) { int i; for(i=0;i<n;i++); }
void delay2(int n) { int i; for(i=0;i<n;i++) delay1(1000); }
//Main program starts here int main(void) { serial_init(); //serial initialization
printf("AT+CMGF=1%c",13); delay2(50); //Text Mode | hex value of 13 is 0x0D (CR ) printf("AT+CMGS=\"9600292363\"%c",13); delay2(50); //Type your mobile number Eg : "9884467058" printf("Hi :-) GSM Modem Test"); delay2(50); //Type text as u want printf("%c",0x1A); delay2(50); //line feed command
while(1); }
Why not?
What have you done to resolve that issue?
Did you study the documentation carefully on how to use the debugger?
The source code you posted is illegible because you did not pay attention to the instructions for posting source code:
www.danlhenry.com/.../keil_code.png
Things will generally not work when you don't follow (or even read) the instructions - so, again, as Per asked, did you study the documentation carefully on how to configure your system to support printf() to your requirements?
Sir/Madam mail me how to configure the printf() function to configure to ARM 7 LPC2148.
i dont have that documentation, how to configure printf statement to support ARM7
Do you mean that Keil have installed an IP filter that is specifically blocking you from reading the documentation online? And no documentation installed in your own machine either? No sample code installed? Nothing?
S SIR I am Unable to open documentation by online
i started to use KEIL uvision 3 now it works sir sir i need some help on coding in ARM using file concept
"I am Unable to open documentation by online"
C'mon now, seriously? Precisely what happens when you click this link?
http://www.keil.com/arm/man/arm.htm
You seem to be constantly stuck. There are programming courses available. Both generic courses, but Keil also now and then holds courses specifically about their products and how to use them.
The majority of users tends to manage without any extra courses. And the secret is that we spend time reading the documentation and looking at example programs. And, of course, making use of search engines.
So why do we do that? Because we don't want the cost of having a private tutor. And web forums aren't filled with people who are so bored as to be private tutors for free.
View all questions in Keil forum