for(k=0;k《8;k++){

Mcs=1;Scs=0;delay(0);

write_com(Page_Add+k);

write_com(Col_Add+0);

for(j=0;j《64;j++) write_data(img[k*128+j]);

Mcs=0;Scs=1; delay(0);

write_com(Page_Add+k);

write_com(Col_Add+0);

for(j=64;j《128;j++) write_data(img[k*128+j]);

}

}

/*------------------显示横--------------AM12864测试程序-------------*/

void Disp_H_Line()

{

unsigned char i,j;

Mcs=1;

Scs=1;

write_com(Disp_On);

write_com(Page_Add);

write_com(Start_Line);

write_com(Col_Add);

for(j=0;j《8;j++)

{

write_com(Page_Add+j);

write_com(Col_Add+0);

// write_com(Start_Line+0);

for(i=0;i《64;i++)write_data(0x00);

}

}

/*------------------显示列-----------------------------*/

void Disp_V_Line()

{

unsigned char i,j;

write_com(Disp_On);

write_com(Page_Add);

write_com(Start_Line);

write_com(Col_Add);

for(j=0;j《8;j++)

{

write_com(Page_Add+j);

write_com(Col_Add+0);

write_com(Start_Line+0);

for(i=0;i《32;i++)

{

write_data(0x00);

write_data(0x55);

}

}

}

/*------------------棋盘-----------------------------*/

void Disp_Cross_Line(unsigned char mode)

{

unsigned char i,j;

unsigned char data1,data2;

if(mode==0) {data1=0xaa;data2=0x55;}

else if(mode==1) {data1=0x55;data2=0xaa;}

else return;

Mcs=1;Scs=1;

write_com(Disp_On);

write_com(Page_Add);

write_com(Start_Line);

write_com(Col_Add);

for(j=0;j《8;j++)

{

write_com(Page_Add+j);

write_com(Col_Add+0);

write_com(Start_Line+0);

for(i=0;i《32;i++){

write_data(data1);