Printing an ASCII Char to the Char LCD

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

cross mob
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

   

I am trying to print the degree symbol (ascii 248) to the Char LCD.  I am trying to use LCD_Char_PutChar or PrintString, but neither give me the right output.  For example, for char 126, which should be a tilde, I get an arrow ➔, which is not in the ascii table at all.  Any ideas where I can get the character map for these?

   

Thank you,
Tom

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

This is not a matter of PrintString(), but concerned with your LCD's coding of special characters. The interface to LCD does not specify which pattern is printed for a character value (think of foreign language chars as Japanese). Try to get hands on the LCD's datasheet or, if all fails, define your own character using the CharLCD component.

   

 

   

Bob

0 Likes

Perfect, the LCD uses the standard HD44780 character set.  I thought it was just expecting ASCII code.

   

Thank you,
Tom

0 Likes