Thanks kef,
That seems to work for the most part...
After I've spent a bit of time looking over the formatting options, I've managed to get it to output whats inside the format string... all except for the floating point number that is!
char cString[64]; // String bufferint n; // Size of string in the bufferfloat x; // Test numbervoid main(void){ MCUinit(); // Initialize device SCI1CR2 |= SCI1CR2_TE_MASK // Enable Xmit x = 1.2345; n = sprintf( cString, "The number is %g.", x); putString(cString); // Use recursion to output over SCI1 asm(SWI); // Halt program and return to BDM}
I've tried different % flags and options, but didn't get anything. cString still has only "The number is ."