Topic : How to use printf?

Forum : 8051

Original Post
Post Information Post
April 22, 2010 - 4:38pm


I would like to use the serial port on a micro (uPSD3354) to send debug messages to a terminal.
But I'm not sure if that's possible.
I included stdio.h and coded printf("Hello World");
This all builds without error.

But... does this data go automatically to the serial port or do I miss something?

Thanks in advance.


Post Information Post
April 26, 2010 - 11:15am

Hi Henk

There is something I am missing in your question,
are you attempting to debug your micro through UART.

What is supposed to happen with our tool is:
if you open a c file, write printf("Hello World"); then "Hello World" is sent on UART.

If you use the simulator you can see this in UART interface of the IDE.
If you are debugging the target you need to configure the micro and see it using a terminal program.

What would you expect ?