例如初始化程序
/************************************************************************/
无效comm_out (无符号整数C)
{
CS1 = 0;
AO = 0;
//命令
LOW =指令
delay(1);
WRT = 0;
P1 = c;
delay(1);
WRT = 0;
CS1 = 0;
delay(5);
}
/************************************************************************/
无效DATA_OUT (无符号整数D)
{
CS1 = 0;
//数据高
AO = 0;
delay(1);
WRT = 0;
P1 = d;
delay(1);
WRT = 0;
CS1 = 0;
}
/************************************************************************/
/*************** NHD‐C12864‐GG DISPLAY INITIATION *******************/
/************************************************************************/
无效的init( )
{
RDD = 0;
WRT = 0;
CS1 = 0;
RST = 0;
RST = 0;
delay(2);
RST = 0;
delay(2);
comm_out(0xA2);
//added 1/9 bias
comm_out(0xA0);
//ADC segment driver direction (A0=Normal)
comm_out(0xC8);
//添加
delay(0);
comm_out(0xC0);
//COM output scan direction (C0= Normal)
comm_out(0x40);
//操作模式
comm_out(0x25);
//电阻率
comm_out(0x81);
comm_out(0x15);
comm_out(0x2F);
comm_out(0xAF);
}
/************************************************************************/
[8]