Some Chinese characters of liquid crystal are not displayed in the Keil C51 Environment.

Source: Internet
Author: User

Problem description: Use the Keil C51 compiling environment with a font LCD. some Chinese characters cannot be displayed when such a statement is used: uchar code coun_show1 [] = {"Please enter the first operand"}; the number of Chinese characters will not be displayed, replace the preceding Chinese characters with simplified Chinese encoding, for example, uchar code coun_show1 [] = {0xc7, 0xeb, 0xca, 0xe4, 0xc8, 0xeb, 0xb5, 0xda, 0xd2, 0xbb, 0xb2, 0xd9, 0xd7, 0xf7, 0xca, 0xfd}; the numbers of Chinese characters can be displayed on the LCD screen. the Chinese characters "Number" are encoded as 0xca and 0xfd. we also found some Chinese characters, such as "in addition to" (Simplified Chinese encoding: 0xb3, 0xfd) and "3" (Simplified Chinese encoding: 0xc8, 0xfd, we also found that the two Chinese characters that cannot be displayed have one thing in common: the second byte of Simplified Chinese encoding is 0xfd.

 

This was a long time ago problem. It should be traced back to this problem when I was preparing for an electronic competition for college students while I was at work. it is only possible to analyze the bug of the compiler, because the LCD can be displayed in simplified Chinese encoding, but it has not been confirmed. I knew that I had been hanging out on the Internet a few days ago and saw a patch before I realized that my original conjecture was correct.

 

It turns out that this is indeed a compiler BUG: during compilation, Keil C51 will filter out the characters 0xfd (some Chinese characters contain the internal code of this character, such as the Chinese character "Number"), resulting inProgramError. Especially when LCD Chinese characters are displayed.

To address this bug, some netizens have created a patch. After downloading the patch, put it in your Keil/C51/bin directory and run the program. You can. v8.02 is supported.

 

You can go to this site to download the patch: http://share.eepw.com.cn/share/download/id/17061

Or go to this website to download the patch: http://www.cndzz.com/down/soft/39675.htm

 

PS: as we are mainly engaged in arm, Keil C51 is basically not used, so I have not tested the above patches.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.