-1
我正在使用8051 MC at89c51系列編寫代碼,以在16x2 lcd顯示器中顯示區域語言。定製區域語言
由於LCD默認不讀取區域語言,因此我創建了自定義字符,並將每個字母轉換爲十六進制。但我不明白的地方是我可以將轉換後的十六進制值存儲在我的代碼中並按照我的意願顯示?
void main()
{
...
str_lcd("HELLO & WELCOME");
delay_ms(3000);
cmd_lcd(0x80);
cmd_lcd(0x01);
...
}
爲「HELLO & WELCOME」的十六進制值是...
{0x40,0x60,0x30,0x1c,0x14,0x14,0x14,0x14},
{0x78,0x08,0x10,0x20,0x18,0x08,0x08,0x08},
{0x20,0x40,0x7c,0x24,0x24,0x04,0x0a,0x11},
{0x78,0x08,0x10,0x20,0x18,0x08,0x08,0x08},
{0x38,0x28,0x38,0x10,0x38,0x28,0x28,0x28},
{0x44,0x44,0x64,0x24,0x24,0x24,0x24,0x3c},
{0x3c,0x40,0x40,0x20,0x18,0x08,0x08,0x08},
{0x00,0x7f,0x55,0x55,0x55,0x55,0x77,0x00},
{0x7c,0x54,0x54,0x54,0x04,0x04,0x04,0x04},
{0x7c,0x10,0x1c,0x04,0x1f,0x04,0x04,0x04},
{0x48,0x48,0x48,0x4e,0x48,0x48,0x48,0x78},
};
所以任何一個可以幫助我,我可以把這個十六進制值,並在LCD顯示屏呢?
謝謝你,但我不確定我是否理解你的意思,早些時候我嘗試過像這樣str_lcd(「HELLO&WELCOME」); static const unsigned char character_data [128] [8] = {//你的數據在這裏,每個字符一個條目,我在這裏插入十六進制值}; delay_ms(3000); cmd_lcd(0x80的); cmd_lcd(0×01);或者你的意思是我把十六進制str_lcd(「」)?我以爲我應該創建一個.h和.cpp文件 - – yonah