mikesmixes777
New Member
Does anyone know of any routines that can convert, for example, a 'int' into a string for the usart to display correctly on a pc.
For example:
function( int number, char*output)
int total=256457;
char my_str=[20];
Int2Str(total, my_str)
So in other words, this will place the ASCII equivalent of "256457" into the string labelled my_str,which then canbe sent to the usart.
I came across this sort of function in the MikroC compiler but I am looking for somethig similar in the C18 MPLAB compiler.
There are various ones for Byte,Short,Word,Int,Long and Float.
For example:
function( int number, char*output)
int total=256457;
char my_str=[20];
Int2Str(total, my_str)
So in other words, this will place the ASCII equivalent of "256457" into the string labelled my_str,which then canbe sent to the usart.
I came across this sort of function in the MikroC compiler but I am looking for somethig similar in the C18 MPLAB compiler.
There are various ones for Byte,Short,Word,Int,Long and Float.