How to show a double number on LCD using code vision for avr

Status
Not open for further replies.

mr_byte31

Full Member level 5
Joined
Oct 19, 2005
Messages
295
Helped
10
Reputation
20
Reaction score
8
Trophy points
1,298
Activity points
3,241
code vision for avr

hi every body
i have code vision
what i want to do is to show a double number on an lcd
i searced for a function to change from double to string but i could'nt found it
can any body help
 

code vision for avr

cast your variable
 

code vision for avr

i am sorry i couldn't undestand
can u explain plz
 

code vision for avr

hi
use printf or sprintf functions.
regards
 

code vision for avr

char *
inttostr (inttype i, char *buf)
{
char *p = buf + INT_STRLEN_BOUND (inttype);
*p = 0;

if (i < 0)
{
do
*--p = '0' - i % 10;
while ((i /= 10) != 0);

*--p = '-';
}
else
{
do
*--p = '0' + i % 10;
while ((i /= 10) != 0);
}

return p;
}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…