TFT屏显示一个字符,为什么是乱码
void LCD_Show_Char(unsigned int x,unsigned int y,unsigned char value)
{
unsigned char i,j;
unsigned char *temp=Font;
temp+=(value-32)*12;
LCD_SetWindow(x,y,x+11,y+7); //设置区域
LCD_WriteReg(0x0020,x);
LCD_WriteReg(0x0021,y);
LCD_WR_REG(0x0022);
for(j=0;j<12;j++)
{
for(i=0;i<8;i++)
{
if(((*temp)&(1<<(7-i)))!=0)
{
LCD_WR_DATA(0xF800);
}
else
{
LCD_WR_DATA(B_COLOR);
}
}
temp++;
}
}
求高手指点 |