Closed rei-vilo closed 11 years ago
As sprintf() is part of stdio.h / libc.a, I suspect this to be a msp430-gcc issue.
sprintf seems to be broken in msp430 libc if either of the numbers is of type uint32_t. If both are declared as type uint16_t then it prints correctly. There is little I can do about this right now other than suggest the mentioned work-around.
The second valued passed to
sprintf
(here,number2
) isn't taken into account on MSP430G2553 while it is done correctly on LM4F120H5QR:Results
sprintf(buffer, "%i.%i", number1, number2);
givesCode