marius810327 said:
Hi
Maverickmax:
Make sure to power the display up from scratch if you don't have a LCD_CLEAR() routine. to clear the memory.
It might be that to must swap the master and slave selection around. What driver does the display have?
wuhuachaoabc:
That is random info that is sitting in the memory of the driver.
hi marius810327
thanks for your help .may i ask you that how can i solve the problem.
here is my program:
void gdraw(unsigned char dat) //fill GDRAM data
{
uchar i,j,k;
uchar add_x=0x80;//GDRAM level address
uchar add_y=0x80;
for(i=0;i<2;i++)
{
for(j=0;j<32;j++)
{
for(k=0;k<8;k++)
{
write_12864com(0x36); / / Open the graphics display
write_12864com(add_y+j); //Vertical Address
write_12864com(add_x+k); / /lever address
write_12864data(dat);
write_12864data(dat);
}
}
add_x=0x88;
}
write_12864com(0x30); / / Restore basic instruction set
}
void drawpoint(uchar x,uchar y,uchar colour)//define uchar unsigned char,define uint unsigned int;
{
uchar xbyte,xbit;
uchar ybyte,ybit;
uchar temph=0x80,templ=0x80;
write_12864com(0x36);/ / Expand command
xbyte=x/16;/ / Calculate the one-byte
xbit=x&0x0f;
ybyte=y/32;/ / Determine the first half or second half of the screen
ybit=y&0x1f;
write_12864com(0x80+ybit);
write_12864com(0x80+xbyte+8*ybyte);
read_12864data();
temph=read_12864data();
templ=read_12864data();
write_12864com(0x80+ybit);/ / Read operation will change the AC, re-set the time
write_12864com(0x80+xbyte+8*ybyte);
if(xbit< 8)//eight
{
if(colour==1)
write_12864data(temph|(0x01<<(7-xbit)));
else
write_12864data(temph&(~(0x01<<(7-xbit))));
write_12864data(templ);
}
else
{
write_12864data(temph);
if(colour==1)
write_12864data(templ|(0x01<<(15-xbit)));
else
write_12864data(templ&(~(0x01<<(15-xbit))));
}
write_12864com(0x30);
}
MSN:wuhuachaoabc@hotmail.com