|
unsigned char code AC_TABLE[]={ //坐標(biāo)編碼
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,
0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
};
/************************************************************************************
顯示字符串
************************************************************************************/
void PutStr(unsigned char row,unsigned char col,unsigned char *puts)
{
LCD_write_cmd(0x30);
LCD_write_cmd(AC_TABLE[8*row+col]);
while(*puts != '\0')
{
if(col==8)
{
col=0;
row++;
}
if(row==4) row=0;
LCD_write_cmd(AC_TABLE[8*row+col]);
LCD_write_data(*puts);
puts++;
if(*puts != '\0')
{
LCD_write_data(*puts);
puts++;
col++;
}
}
} |
|