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

Printf problem..

Hi,

This is my program.

int a = 0x0A;

printf("%c",a);

Why is it that the output from the serial port is 0x0D and 0x0A instead of just 0x0A itself?

Thanks..

Parents
  • Well, there are several ways to overcome this problem...

    1. Go to a Keil training class. There, they teach how to do stuff like that plus a whole lot more.

    2. Hire a consultant. There are many good to great consultants on this forum who would be more than happy to consult for you.

    3. Take a look in the manuals to find out how to configure printf for your needs. Then, look at the putchar.c file in the lib directory.

    Jon

Reply
  • Well, there are several ways to overcome this problem...

    1. Go to a Keil training class. There, they teach how to do stuff like that plus a whole lot more.

    2. Hire a consultant. There are many good to great consultants on this forum who would be more than happy to consult for you.

    3. Take a look in the manuals to find out how to configure printf for your needs. Then, look at the putchar.c file in the lib directory.

    Jon

Children