hello ,
I have converted hexadecimal to decimal and i am able to print on GLCD, now i have to do suitable mathematical operation on decimal value and to print on GLCD, but i could not able to suceed. here is my sample code
#define x=0.0762939453125;
void main()
{
unsigned char Pstring[ 16 ] = " ";
unsigned char y, z, voltage;
{
___________
}
for ( i = 0; i < 16; Pstring[ i ] = '\0', i++ );
sprintf( Pstring, "%04d", ( uint16 ) ADC_Sample_Max );
GLCD_Text(40, 20, FONT_FIFTEEN_DOT, Pstring);
// in the above line i am able to print decimal value , to do operations am doing below operations
voltage=Pstring*x;
voltage=voltage/20;
y=voltage+10;
z=y/0.19;
GLCD_Text(40, 20, FONT_FIFTEEN_DOT, z); // here z value should print.
}
|