dear all

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

how to Print ADC output on GLCD .

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I assume you have API's for the Graphic LCD to print a character string.

   

 

   

So you set up a buffer, say 20 characters

   

 

   

unsigned char pString[21]               // 20 characters + place for end of string null character '\0'

   

 

   

Then use sprintf() to convert ADC value to string.

   

 

   

Formatting characters for the sprintf() formatting specifier, examples attached.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable
0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I assume you have API's for the Graphic LCD to print a character string.

   

 

   

So you set up a buffer, say 20 characters

   

 

   

unsigned char pString[21]               // 20 characters + place for end of string null character '\0'

   

 

   

Then use sprintf() to convert ADC value to string.

   

 

   

Formatting characters for the sprintf() formatting specifier, examples attached.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

the function i have is

   

void GLCD_Text(uint8 left, uint8 top, uint8 font, const char *str);

   

and i want to print ADCoutput= ADCDelsig_GetResult32( );

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

So set up buffer as I suggested, look in compiler manual, Keil,

   

for typing of sprintf(), and you are good to go. 2 lines of code.

   

 

   

Regards, Dana.