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

for Graham Cole

Dear Mr. Cole!

I have just noticed a recent tread about printf. Could i have a copy of your user_printf() rutine.

my email is pgb@c.dk

Thanks!

Parents Reply Children
  • Dear Mr. Cole!

    Newbie in C programming.
    I am trying to use a LCD and the serial port in parallel, and have trouble to figure out how to use the putchar, instead of printf.
    I have made two different programs, one prints fine to my LCD, the other works fine to my serial port.
    Problems start when trying to merge the two programs.
    Being a newbie i need to look at code to try understanding it.

    Maybe i could get a copy of your user_printf().

    Regards

    Bjarke Nielsen
    Bjarke.Nielsen@mail.dk

  • "...trouble to figure out how to use the putchar, instead of printf."

    The trouble is that you are still missing the point; viz, that you do not use putchar instead of printf.

    http://www.8052.com/forum/read.phtml?id=72968

    printf calls putchar to perform the actual output of each character; Graham's user_printf will do exactly the same - so it will make no difference to your problem here.

    What you need to do is to write your own putchar to implement your required behaviour.
    You have already been given a link that describes exactly how to do just that:
    http://www.keil.com/forum/docs/thread4150.asp