反白程序如下:
u8 const Lcd_Con_X_Y[4][2]={{0x80,0x80},{0x80,0x90},{0x88,0x80},{0x88,0x90}};
void con_disp (unsigned int line,unsigned int enable)
{
u8 i,j;
for(j=0;j<16;j++)
{
for(i=0;i<8;i++)
{
Write_LCD_Command(0x36);
Write_LCD_Command(Lcd_Con_X_Y[line][1]+j);
Write_LCD_Command(Lcd_Con_X_Y[line][0]+i);
Write_LCD_Command(0x30);
if(enable==1)
{
Write_LCD_Data(0xff);
Write_LCD_Data(0xff);
}
else
{
Write_LCD_Data(0x00);
Write_LCD_Data(0x00);
}
}
}
Write_LCD_Command(0x36);
Write_LCD_Command(0x30);
}
void con_disp8(unsigned int x,unsigned int y,unsigned int direction)
{
u8 j;
for(j=0;j<16;j++)
{
Write_LCD_Command(0x36);
Write_LCD_Command(y+j);
Write_LCD_Command(x);
Write_LCD_Command(0x30);
if(direction==1)
{
Write_LCD_Data(0x00);
Write_LCD_Data(0xFF);
}
else
{
Write_LCD_Data(0xFF);
Write_LCD_Data(0x00);
}
}
Write_LCD_Command(0x36);
Write_LCD_Command(0x30);
}
抄的网友的单行反白和单个字符反白,均无**常显示,求教各位论坛高手! |