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.
Greetings,
I'm "attempting" to use the printf statement within my main code. Currently I'm seeing nothing out.
My processor is a Dallas DS80C320. This has two serial port. - sbuf0 and sbuf1.
Is there anything I need to do regarding printf - meaning when I'be used an "8051" printf worked and went to sbuf. What tells the code to direct it to sbuf0.
I have started with older code - again - printf worked with an 8051. I'm purely guessing that somewhere I need to tell it to rename from sbuf to sbuf0.
I notice within the include stdio.h file I see: extern int printf (const char *, ...);
Help
Thanks -Sparky
Note that printf isn't a statement - it's a function.
Have you looked at the description of printf in the C51 Manual? It tells about the default low-level output driver, and where to find the source to modify to your own requirements:
http://www.keil.com/support/man/docs/c51/c51_printf.htm
Also, the "Hello, world" example program demonstrates the use of printf...