Via use of extended library of Compiler, itoa(0, ltoa(), ftoa(), sprintf(),
all convert numerics into a string. You declare a string buffer, pass
it as a pointer to these functions, and they will do conversion and
fill the buffer with a NULL terminated string. Then you use UART
APIs to send. Remember to use following in file where f()'s are used
- Code: Select all
#include <stdlib.h>
#include <string.h>
When you declare the char array make it 1 bigger than longest string you
will handle, to make room for NULL character, which terminates string.
Regards, Dana.