我写了个彩屏程序,可以改变做到比如白色底色,前面显示一个黑色的方块。
可是不能显示汉字。请指教,程序如下,谢谢!
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();
} |