Please a little help. I have a uVision Demo. I am trying to display a message using the printf function. I wrote my aplication then made a copy of the putchar.c file that comes with the application. I put such a a copy in my project folder and a modified it. I just wrote this: void Dispcharac (unsigned char u); then I added to my project finally, I defined this subroutine in my main source to go to write data on the display. this is my subroutine: void Dispcharac (unsigned char u) { writedata(u,1); } writedata(u,1) subroutine writes the data in the port. I wonder what's wrong? Is there anyone on Earth that can help me? Thanks for any help Omar
"I wonder what's wrong?"
You've given a wounderful story about what you've done, but you haven't actaully said what happens! What is your problem?
"writedata(u,1) subroutine writes the data in the port"
Do you mean you've confirmed that writedata(u,1) does actually write correctly to the port, or do you just mean that it should write to the port?
"How do printf and putchar really work?"
Refer to the descriptions in the Manual:
http://www.keil.com/support/man/docs/c51/c51_printf.htm
The description of printf tells you how it relates to putchar, and the description of putchar tells you where to find the source code - so you can see exactly how putchar works!