This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do printf and putchar really work?

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

Parents
  • "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?

Reply
  • "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?

Children