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 keil uvision 2. plss tell me why we use printf in embedded c? if its 4 debugging,HOW? if its 4 serial commn/transmit characters to serial port,HOW? plsssssssssssssss some1 help.........i searched everywere but i dint get answer..
The more time you spend making your question clear and complete, the more likely you are to get good replies!
"In NORMAL c for non-embedded application we use printf to print something on screnn (monitor)"
No, that's not exactly true, is it?
The actual definition is that printf writes to stdout - and it's stdout that is normally routed to the screen.
"People DO use printf in embedded C ,i know"
How do you know?
"but WHY?"
This has already been answered: people use printf because it is appropriate to the task at hand - specifically, for making formatted text output.
There are plenty of examples on this very site that use printf - so take a look at them!
"If i write, printf("dhaneesh");//target: 8051 what will happen?"
For implementation-specific details, you must always read the Manual for the particular tools in question!
The Keil C51 Manual clearly explains its implementation of printf
"Will it pass each character to serial port"
Please read the manual!
"Will it display on Serial Window?"