Resolving LCD12864 Display Issues with Missing Characters

Resolving LCD12864 Display Issues with Missing Characters

Characters Not Displaying – Add \xfd at the End

Resolving LCD12864 Display Issues with Missing Characters

Let me explain!

This issue is due to an inherent bug in Keil itself; the Keil compiler ignores strings ending with 0xFD, resulting in garbled characters for Chinese characters that end with 0xFD and the characters immediately following them, because it discards the 0xFD, leading to a string of errors. (However, Keil does not consider this a bug, so they have not modified this flaw.)

Character encodings 0xFD, 0xFE, and 0xFF are used internally by the C compiler. The ANSI standard only requires support for ASCII characters in the range of 0x00 – 0x7F.

You can insert these characters into strings using HEX encoding as follows:

code char RussianString [] =”My Text” “\ xFD”;

A simple text replacement to replace all 0xFD characters with the string ‘”\ xFD”‘ should work.

****************************************************************************************************************************************

Some users might consider modifying files in Keil, but it is not highly recommended, as once modified, unforeseen errors may arise later.

So we can manually add a \xfd to display correctly. The example can be modified as shown in the image.

Readers can refer to the following two for comparison.

The following are related Chinese characters extracted from GB2312:

Compliment Cake Prosperity Eliminate Await Spy Eel Capture Geng Pass

Paste Accumulate Arrow Ash Lord Chief Example Cage Slow Mistake

Condense Pipa Qiji Drive Three Rise Number She Listen Delusion

Tin Mix Spin Demon Lead Educate Zha Correct Cast

Lost Cold Beichuan Pile Luocai Stalk Coo Pigeon Bear

Joy Fade Flow Maid Silk Zong Wheel Puncture Stink

Uneasy Eye Coin Bar Phlegm Qi Mite Bamboo Tube Wine

鳊鼾

Chinese characters ending with 0xFD do not display

Resolving LCD12864 Display Issues with Missing Characters

Leave a Comment