I am trying to write an array of adc values in ascii format one decimal value at a time. I am able to get the below code to work fine when I use "%d". However, I need the values to be unsigned. When I use "%u", though, sprintf writes nothing but 0x00 in my result array.
Any idea why this is happening and how I can get my values unsigned??
Thanks!
unsigned adc[10];
for(i=0;i<10;i++)
{
char result[10] = {0};
unsigned num = adc[i];
sprintf( result, "%u", num );
Write_Result(result);
}