我这里也有个初始化,也给你看看。
不过你的中文太差了,什么叫“初筛化程序",应该是”初始化程序“。
void init()
{
RES=1;
delay(50);
RES=0;
delay(1);
RES=1;
delay(50);
delay(200);
kscan();
write_com(0x38); //FUNCTION SET 001,DL,N,DH,IS2,IS1
delay(50);
write_com(0x38); //FUNCTION SET 001,DL,N,DH,IS2,IS1
delay(50);
write_com(0x38); //FUNCTION SET 001,DL,N,DH,IS2,IS1
delay(50);
write_com(0x3c); //FUNCTION SET 001,DL,N,DH,IS2,IS1
delay(50);
write_com(0x42); //COM、SEG direction select
delay(50);
write_com(0x05); //05
delay(50);
write_com(0x38); //FUNCTION SET 001,DL,N,DH,IS2,IS1
delay(50);
write_com(0x06); //ENTRY MODE SET
delay(50);
write_com(0x02); //RETURN HOME
delay(50);
write_com(0x0c); //DISPLAY ON ,00001DCB ,D=1:Display on; 0:off
delay(200);
write_com(0x01); //CLR DISPLAY
delay(50);
}
|