This has been covered a few times but I can't seem to find an answer that works.
I'm using
void lcd_write_int(unsigned int data) { char st[16] = ""; // Make space itoa(data,st,10); lcd_write_string(st); }
to read data from and A to D and then I'm sending the data to my LCD display. Once over 32,768 the LCD displays - negative numbers. I tried with long but the same negative numbers.
Is there a long to string ?
Tried this but no numbers at all were displayed.
void lcd_write_int(unsigned int data) { char st[10]; sprintf(st,"%s",data); lcd_write_string(st); }