Hi All,
I have been working on project in which I have to display the ADC value on GLCD. I have the GLCD library which is able to draw the bitmap image on display. What I am doing that storing the ADC result in prdefined variable.
GLCD has a four functions which is being used to print string on display.
PutMessage // print any string
PutChar // prints only sngle byte on Display,argv = ASCII equivalent
PutMessage32x20
PutChar32x20
Please refer below example the working of the above function.
The other functions PutMessage32x20 and PutChar32x20 are not displaying anything on Display. I felt, there must be a problem with the function definition. Please if you could help to correct those functions would be really appreciated..
The snippet of main code for the program as below:
I want to print the adc_val on the display using the sprintf , Am I using the correct function to print on display ? To be fair with you I am not an expert in C as you might had feel from my code and explanation of the code.
It would be very helpful if you help me with the GLCD library functions. Your suggestions are always welcome if is there any other way to print the output on display.
I have been working on project in which I have to display the ADC value on GLCD. I have the GLCD library which is able to draw the bitmap image on display. What I am doing that storing the ADC result in prdefined variable.
GLCD has a four functions which is being used to print string on display.
PutMessage // print any string
PutChar // prints only sngle byte on Display,argv = ASCII equivalent
PutMessage32x20
PutChar32x20
Please refer below example the working of the above function.
Code:
PutMessage((rom char*) "hello world ") // Prints the hello world string
PutChar unsigned data char)) //where data is ASCII equivalent of desired characted wants to print
The other functions PutMessage32x20 and PutChar32x20 are not displaying anything on Display. I felt, there must be a problem with the function definition. Please if you could help to correct those functions would be really appreciated..
The snippet of main code for the program as below:
Code:
char adc_val [11];
float V;
ADCResult = ReadADC(); // Storing ADC output in ADCResult
V= (ADCResult*5)/1024; // desired output
sprintf(adc_val,"%f ",V); // want to display
PutChar adc_val); //
I want to print the adc_val on the display using the sprintf , Am I using the correct function to print on display ? To be fair with you I am not an expert in C as you might had feel from my code and explanation of the code.
It would be very helpful if you help me with the GLCD library functions. Your suggestions are always welcome if is there any other way to print the output on display.