The (my) preferred way to convert a number to a string in ASCII is to use the sprintf() function which allows for a format-specifier to control the conversion.
For a GLCD you will need another conversion that converts the character to a bit-pattern. I could not find an example for a GLCD, but in the software for the FitstTouch - boards is the "PSoC Rocks" program which uses a similar conversion, have a look at it.
What kind of GLCD do you want to use? Do you have already a library for accessing it (can write a string to it already)?
Is this logic has any logical errors.
uint16 ADC_Sample_Max, decimal, converted_decimal;
while( ADC_Sample_Max !=0 )
ADC_Sample_Max / 10;
Your example does not confirm to C-language standards. I would suggest you to enter your code into PSoC Creator main.c and try to translate it and then correct the errors listed.
To proof the logic behind your code best would be to use a development kit and single-step through the code.
A hint: converting a binary number between 0 and 9 into a printable ASCII character is done by oring that byte with 0x30.
LCD_Char_PrintInt16() already prints in hex. If you want to print in decimal, you need to use PrintNumber().
But I thought we are talking about a graphical LCD? Then you should use sprintf() to print the data you need into a character buffer, which you then can convert into something to dispülay on the GLCD (preferrably there is already a library for the LGCD doing the latter).
The GLCD is compatible with Segger emWin library, which contain
functions for converting chars to write in graphical form to LCD.
But this assumes the (physical) GLCD is compatible with the GLCD component in Creator...