How to display Chinese characters with graphics on LCD
Author:Huazai Time:2021-07-21 15:47 Browse(458)
Lcdmsg ("current", 2,2);

lcdmsg ("current"

How to display Chinese characters with graphics on LCD

2,2)
void lcdmsg (signed char * addr.
signed char line, signed char row) / / transmits a string.
{.
lcddingwei (line.
row)
while(*addr>0).
{.
lcdTransferData(*addr.
1);.
addr++;.<
}.
void lcdtransferdata (char data1.
bit DI) / / transmit data or command, when Di=0, transmit command, when Di=1, transmit data..
{.
lcdbuzy()
RW=0;.
RS=DI;.
P0=data1;.
EN=1;.
EN=0;.
.
}.
void lcdBuzy().
{.
P0=0xff;.
RW=1;.
RS=0;.
EN=1;.
while(P0&0x80);.
EN=0;.
}.
void lcdDingwei(unsigned char line.

{.
unsigned int i;)
switch(line).
{.
case 1: i=0x80+row; break;.
case 2: i=0x90+row; break;.
case 3: i=0x88+row; break;.
case 4: i=0x98+row; break;.
default: i=0x80; break;.
.
}.
lcdTransferData(i.
0);.
.
}.
.
Hot labels
Related topics