Hello and welcome to our blog article today.
A few days ago, we presented you with a Post shown how to output self-created characters such as umlauts on a 1602 or 2004 LC display.
However, the character table published there already contains the characters for "äöüß°" and "a". For many applications, these would be enough.
However, because the table does not adhere to the UTF-8 standard, these characters cannot be easily output.
However, we can instruct the chip directly to output a specific character via a so-called escape sequence.
An escape sequence is a combination of characters in technical informatics that does not represent text, but is intercepted by the device and performs a special function.
Typically, it starts with a backslash, followed by a number.
This allows the characters mentioned initially to be output as follows:
Lcd.Print("XE1"); outputs an ä Lcd.Print("XEF"); gives a ö Lcd.Print("XF5"); gives an ü Lcd.Print("XE2"); gives a ß Lcd.Print("XDF"); outputs a ° Lcd.Print("XE4"); outputs a Lcd.Print("XF4"); outputs a
To end an escape sequence, you can insert a wider backslash at the end. For example, to use the output "Food: 23 °C" on the display, you can use the following spelling:
Lcd.Print("K xF5"che: 23 xDF-C");
We hope that our tips for correctly displaying special characters and umlauts on LC displays will prove useful in your projects and look forward to your feedback.
I wish you every success in your projects and say goodbye to the next contribution.
Yours Markus Neumann