彩屏显示汉字的问题

[复制链接]
3142|5
 楼主| chen3bing 发表于 2011-9-2 19:03 | 显示全部楼层 |阅读模式
我写了个彩屏程序,可以改变做到比如白色底色,前面显示一个黑色的方块。
可是不能显示汉字。请指教,程序如下,谢谢!
code uchar zimo1[32]=
{0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x80,0x02,
0x80,0x02,0x80,0x02,0x40,0x04,0x40,0x04,0x20,0x08,0x10,0x10,0x0E,0x20,0x04,0x40
};
void display_chinese(uint color1,uint color2,uint startx,uint starty,uint endx,uint endy,uchar temp[])
{
uint i,j;
M7_BUS_Instruction_Command_8(0x2a);
M7_BUS_Instruction_Data_8(startx/256);
M7_BUS_Instruction_Data_8(startx%256);
M7_BUS_Instruction_Data_8((endx-1)/256);
M7_BUS_Instruction_Data_8((endx-1)%256);//480
M7_BUS_Instruction_Command_8(0x2b);
M7_BUS_Instruction_Data_8(starty/256);
M7_BUS_Instruction_Data_8(starty%256);
M7_BUS_Instruction_Data_8((endy-1)/256);
M7_BUS_Instruction_Data_8((endy-1)%256);//272
M7_BUS_Instruction_Command_8(0x2c);

SetM7_BUSDC();
SetM7_BUSRD();
ClrM7_BUSCS();
for(i=0;i<32;i++)   //0-32
{
for(j=0;j<8;j++)     //0-8
{
  if((temp[i]&0x1)==0x1)
   M7_BUS_Data_Input(color2);
  else
   M7_BUS_Data_Input(color1);
   temp[i]=temp[i]>>1;
}
}
SetM7_BUSCS();
}
 楼主| chen3bing 发表于 2011-9-2 19:27 | 显示全部楼层
高手支招啊!
 楼主| chen3bing 发表于 2011-9-2 20:09 | 显示全部楼层
我把前面的CODE去掉就好了。可是这样RAM就不够用了。怎么解决呀?
 楼主| chen3bing 发表于 2011-9-2 20:18 | 显示全部楼层
前面加xdata就好了。OK!
huangqi412 发表于 2011-9-2 22:39 | 显示全部楼层
晕翻,用传统51驱动彩屏?
 楼主| chen3bing 发表于 2011-9-3 07:32 | 显示全部楼层
stc12c5a60s2
您需要登录后才可以回帖 登录 | 注册

本版积分规则

439

主题

2540

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部
0