有人用过240128 6963c液晶吗。我想实现一个区域反显。下面的程序是网上总结来的。
帮看看为什么不好使呢?显示的效果是从左下角到右上角斜下的一堆堆的。怎么办呀?
//反显一个字符
//lin:行(0-7), column: 列(0-15)
void ReverseShowChar0(unsigned char lin,unsigned char column)
{
unsigned char i;
unsigned char dat;
unsigned int StartAddr;
StartAddr=lin*LineChar +column; //定位起始行
for(i=0;i<16;i++)
{
LCD_WriteTCommand3(0x24,(unsigned char)(StartAddr),(unsigned char)(StartAddr>>8)); //set address
LCD_WriteTCommand1(0xc5); //数据一次读,地址不变
dat=InPortData(); //读入数据
dat=~dat; //取反
LCD_WriteTCommand2(0xc4,dat); //送回
StartAddr=StartAddr+LineChar;
}
}
|