购物须知 不接受请绕道 拍下视为接受
本店无法提供技术支持,所有资料都在详情里了,谢绝还价,不包邮,初学的菜鸟显不出字的不要问我为啥没字,问了也不懂,概不退换货,所有产品全部现货真实库存,快递一般发申通、中通不超重10,我们没有能力控制快递公司的速度,想快递公司自己打,本店产品均为实物拍摄,发出前一定会严格测试好评如潮。
全新原包装,COG型12864,外形尺寸 55*40(不包含排线的尺寸)。
34pin 引脚间距:1mm
安装方式必须焊接到板上,不能使用fpc插座。
控制器ST7565S,可以选择并口通信或者串口通信,8080接口和6800接口可选。
工作电压3.3伏,需外接电容就可产生负压来驱动液晶,或者直接在VOUT脚接负压。
橙色背光2.0伏电压,请注意外接限流电阻。
控制器ST7565S资料下载:
http://picimg.lshou.com/pic/www.lcdmk.com/tbpic/ST7565S.pdf
尺寸资料下载:
http://picimg.lshou.com/pic/www.lcdmk.com/tbpic/PE12864.pdf
配套pcb转接板有售:http://shangqiu.lshou.com/shop/c1626/tdce8c86c8d6.html
配套pcb转接板图纸下载:http://picimg.lshou.com/pic/www.lcdmk.com/tbpic/lcd12864.rar
引脚定义,正面最左边为1脚(接近背光k为1脚):
1 IRS 必须接3.3伏
2 /HPM
3 P/S 串口和并口选择 H并口 L串口
4 C86 6800和8080接口选择 H,6800 L,(咨询特价)
5 VR
6 V5
7 V4
8 V3
9 V2
10 V1
11 VRS (建议先用1兆可调电阻尝试)
12 CAP4+
13 CAP2+
14 CAP2-
15 CAP1-
16 CAP1+
17 CAP3-
18 CAP5-
19 VOUT
20 VSS GND
21 VDD 3.3V
22 D7 (SID)
23 D6 (SCLK)
24 D5
25 D4
26 D3
27 D2
28 D1
29 D0
30 /RD
31 /WR
32 A0 (RS)
33 /RES
34 /CS
照片中的显示内容程序如下:
#include<REG52.H>
#include<INTRINS.H>
#include<PIC.C> //1100
#define VC_ON 0x2C //1010
#define VR_ON 0x2A
#define VF_ON 0x29 //1001
#define NOP _nop_();_nop_();_nop_();_nop_()
#define data P0
sbit CS = P2^7;
sbit RES = P2^6;
sbit RS = P2^5;
sbit RW = P2^4;
sbit Read = P2^3;
/******************************delay time***********************************/
void delay_ms(unsigned int ms)
{
unsigned int n ;
while(ms--)
{
n = 86;
while(n--);
}
}
/****************************reset IC for start****************************/
void LCD_Reset()
{
IE = 0x00;
RES = 0;
delay_ms(50);
RES = 1;
delay_ms(50);
}
/*******************************write data to IC**************************/
void w_dat(unsigned char dat)
{
data = dat;
NOP;
RS = 1;
RW = 0;
Read = 1;
NOP;
CS = 1;
_nop_();
CS = 0;
}
/******************************write Command to IC***********************/
void w_cmd(unsigned char cmd)
{
data = cmd;
NOP;
RS = 0;
RW = 0;
Read = 1;
NOP;
CS = 1;
_nop_();
CS = 0;
}
/***************************display picture *****************************/
void Display(unsigned char *p)
{
unsigned char page,column;
for(page=0xB7;page>=0xB0;page--)
{
w_cmd(page); //set page address
w_cmd(0x10); //set Column address MSB
w_cmd(0x00); //set column address LSB
for(column=0;column<128;column++)
{
w_dat(*p++);
}
}
}
void Display_fill(unsigned char fill)
{
unsigned char page,column;
for(page=0xB7;page>=0xB0;page--)
{
w_cmd(page); //set page address
w_cmd(0x10); //set Column address MSB
w_cmd(0x00); //set column address LSB
for(column=0;column<131;column++)
{
w_dat(fill);
}
}
}
void Grid_white()
{
unsigned char page,column;
for(page=0xB7;page>=0xB0;page--)
{
w_cmd(page);
w_cmd(0x10);
w_cmd(0x00);
for(column=0;column<65;column++)
{
w_dat(0xFF);
w_dat(0x00);
}
}
}
void Grid_Black()
{
unsigned char page,column;
for(page=0xB7;page>=0xB0;page--)
{
w_cmd(page);
w_cmd(0x10);
w_cmd(0x00);
for(column=0;column<65;column++)
{
w_dat(0x00);
w_dat(0xFF);
}
}
}
void Grid_Line1()
{
unsigned char page,column;
for(page=0xB7;page>=0xB0;page--)
{
w_cmd(page);
w_cmd(0x10);
w_cmd(0x00);
for(column=0;column<131;column++)
{
w_dat(0xAA);
}
}
}
void Grid_Line2()
{
unsigned char page,column;
for(page=0xB7;page>=0xB0;page--)
{
w_cmd(page);
w_cmd(0x10);
w_cmd(0x00);
for(column=0;column<131;column++)
{
w_dat(0x55);
}
}
}
void Init_IC()
{
CS = 0;
P3 = 0xFF;
LCD_Reset();
w_cmd(0xA3); //LCD Bias selection(1/65 Duty,1/7Bias)
w_cmd(0xA0); //ADC selection(SEG0->SEG128)
w_cmd(0xC0); //SHL selection(COM0->COM64)
w_cmd(0x26); //Regulator Resistor Selection
delay_ms(5);
w_cmd(0x81); //Electronic Volume
w_cmd(0x20); //Reference Register selection Vo=(1+Rb/Ra)(1+a)*2.1=10
w_cmd(VC_ON); //Power Control(Vc=1;Vr=0;Vf=0)
delay_ms(10);
w_cmd(VC_ON|VR_ON);
delay_ms(10);
w_cmd(VC_ON|VR_ON|VF_ON);
delay_ms(10);
w_cmd(0xF8);
w_cmd(0x01);
delay_ms(5);
w_cmd(0xAF); //Display on
}
void main()
{
while(1)
{
Init_IC();
Display_fill(0xFF);
delay_ms(1000);
Grid_white();
delay_ms(1000);
Grid_Black();
delay_ms(1000);
Grid_Line1();
delay_ms(1000);
Grid_Line2();
delay_ms(1000);
Display_fill(0x00);
delay_ms(5); ;
Display(deep);
delay_ms(3000);
}
}
unsigned char code deep[] = {
0x00,0x00,0x00,0x00,0x0E,0x03,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7C,0x23,0x1F,
0x00,0x00,0x01,0x01,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0x1F,0x07,0x06,0x06,0x06,
0x06,0x06,0x06,0x1F,0x31,0x0E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x3F,
0x00,0x00,0x00,0x00,0x7F,0x27,0x18,0x00,
0xFF,0x2E,0x10,0x01,0x03,0x00,0x00,0x00,
0x00,0x2F,0x39,0x05,0x0A,0x00,0x00,0x00,
0x7F,0x27,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7F,0x37,0x0C,0x00,0x00,
0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x17,0x38,0x07,0x0D,0x00,0x03,0x03,
0x03,0x03,0x03,0x03,0x0F,0x1E,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xF0,0x8F,0x7F,
0x20,0x38,0x28,0x2F,0x29,0x28,0xEF,0xE9,
0x28,0x28,0x68,0x88,0x78,0x08,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFD,0x05,0x05,0x05,
0x05,0x05,0x05,0xFD,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,
0x03,0x77,0x70,0x60,0xFF,0xFF,0x60,0x60,
0xFF,0xFF,0x60,0xE0,0x20,0xE0,0x00,0x00,
0x00,0x55,0xFF,0x2A,0x00,0x00,0x00,0x00,
0xFF,0xFF,0x00,0x00,0x00,0x07,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x30,0x38,0x30,
0x30,0x30,0x30,0xFF,0xFF,0x30,0x30,0x30,
0x70,0x90,0xF0,0x10,0x00,0x00,0x00,0x00,
0x00,0x75,0x8A,0x75,0x5A,0x00,0x80,0x80,
0x00,0x01,0x0E,0x71,0x9E,0xE0,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0C,0x1B,0x06,0x01,0x00,0x03,
0x3F,0x00,0x7F,0x9F,0x60,0x81,0xFE,0x3F,
0xC3,0x03,0x1F,0x14,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0xDF,0xFE,0x02,0x02,0x02,
0x02,0x02,0x02,0xFE,0xFF,0x00,0x00,0x00,
0x00,0x00,0x80,0xE0,0xC0,0xC7,0xF8,0xFF,
0xC0,0xC0,0x40,0x7F,0xDF,0xD8,0x18,0x18,
0xD8,0x98,0x7F,0x1E,0x00,0x00,0x04,0x07,
0x06,0x56,0xFF,0x86,0x16,0xBE,0xE2,0xC0,
0xFF,0xFF,0xC0,0xC0,0xC0,0xFF,0x7F,0x80,
0x00,0x00,0x00,0x38,0x28,0x28,0x28,0x28,
0x2B,0x29,0x28,0xE8,0xE8,0x2F,0x29,0x28,
0x28,0x28,0x2B,0xCD,0x36,0x0C,0x00,0x0C,
0x0E,0x7D,0x8A,0x65,0xBE,0x7C,0x14,0x05,
0x3F,0xD8,0x60,0xA0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xC0,0x3E,0xFF,0x03,0xFF,
0x81,0x1E,0xF3,0xCC,0x03,0xFE,0x78,0x9F,
0x02,0x11,0xFE,0xAB,0x00,0x00,0x00,0x00,
0x07,0x02,0x00,0xF8,0xF8,0x87,0x81,0x80,
0x80,0x83,0x80,0xF0,0x20,0xC0,0x03,0x07,
0x00,0x00,0x00,0x00,0x0F,0xF1,0x0F,0xFF,
0x7F,0x0F,0x00,0xFF,0xEF,0x28,0x28,0x28,
0x28,0x28,0xEF,0xFB,0x00,0x00,0x00,0x00,
0x00,0xAA,0xFF,0xAA,0x00,0x00,0x00,0x00,
0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFF,0x03,
0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x00,
0xE0,0x9F,0x7F,0x00,0x00,0xFF,0x7F,0x80,
0x00,0x70,0xF0,0x80,0x00,0x00,0x00,0x00,
0x00,0x55,0xAA,0x55,0x96,0x20,0xEC,0xD8,
0x37,0x38,0x3D,0x33,0x3C,0x3F,0x30,0xDF,
0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,
0xFC,0x60,0xFF,0x03,0xFC,0xE0,0x7F,0xC1,
0x3C,0xFE,0x3B,0x80,0x00,0x00,0x00,0x00,
0x6A,0xFF,0xC1,0xC0,0xC0,0xFF,0xBF,0x40,
0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xFF,0x9F,
0x60,0x00,0x00,0x1F,0xFF,0xE0,0xFF,0xFF,
0xC0,0xF0,0x00,0xFF,0xFE,0x30,0x3F,0x3F,
0x30,0x31,0xFF,0xFC,0x00,0x00,0x00,0x00,
0x00,0xAA,0xFF,0xB2,0x20,0x38,0x30,0x30,
0xFF,0xFF,0x3F,0x33,0x30,0xF0,0xF0,0x90,
0xF0,0x10,0x00,0x00,0x00,0x80,0x7C,0xC3,
0x3F,0x00,0x80,0x00,0x01,0xFF,0xFC,0x00,
0x00,0x00,0x00,0x01,0x03,0x00,0x00,0x00,
0x00,0x55,0xAA,0x4A,0xB5,0x03,0x06,0x0F,
0xF1,0x7E,0x80,0xF7,0x7F,0x80,0x07,0xF8,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x17,0xF0,0xFF,0xC0,
0x00,0x00,0xFF,0x80,0x00,0x00,0xE0,0xFF,
0xFF,0x7C,0x80,0x00,0x00,0x00,0x00,0x00,
0xDA,0xFF,0x1C,0x18,0x18,0xFF,0xFF,0x00,
0x00,0xFF,0xFF,0x18,0x18,0x18,0xFF,0xFF,
0x00,0x00,0x3C,0xF0,0xC0,0x00,0xFF,0xFF,
0x10,0x1C,0x18,0x18,0x18,0x1F,0xF3,0xFF,
0x1B,0x18,0x18,0x78,0xC8,0x38,0x01,0x03,
0x04,0xAD,0xFA,0xA6,0x28,0x58,0x60,0x1F,
0xEF,0xF0,0xFC,0xFB,0x07,0x00,0x00,0x00,
0x00,0x00,0x20,0x38,0x30,0x30,0x30,0xF0,
0xB0,0x30,0x30,0x37,0xF9,0xFE,0x30,0x30,
0x30,0x30,0x30,0xF0,0xF0,0x10,0x00,0x01,
0x06,0x58,0xA7,0x1C,0xF1,0xC2,0x17,0x7C,
0xC0,0x0F,0xF3,0x3C,0xC0,0x00,0xFF,0x07,
0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,
0x00,0x00,0xFF,0x00,0x00,0x07,0x39,0xDE,
0xE8,0x67,0x11,0x0C,0x03,0x01,0x00,0x00,
0xAA,0xFF,0x23,0x03,0x03,0xFF,0xFF,0x00,
0x00,0xFF,0xFF,0x03,0x03,0x03,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,
0x00,0x00,0x00,0x03,0x1F,0xEC,0xF0,0x80,
0xFC,0x33,0x0E,0x01,0x01,0x00,0x60,0x90,
0x50,0xA0,0x80,0x00,0x03,0x1D,0xE6,0x78,
0x80,0x00,0x00,0xC0,0x38,0xE7,0x18,0x06,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x1F,0x6C,0xB0,0xC0,0xC0,0xB0,0x48,
0x46,0x31,0x08,0x07,0x01,0x00,0x00,0xD0,
0x78,0xA0,0x80,0x40,0xB0,0xE0,0x80,0x07,
0x7E,0xB0,0xC7,0x02,0x02,0x03,0xFE,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xE0,0x10,0xF0,0x00,
0x00,0x7C,0xE8,0x1C,0x70,0xE0,0x80,0x00,
0x00,0x00,0xC0,0x30,0xD0,0x40,0x00,0x00,
0xD8,0xE8,0x00,0x00,0x00,0xF0,0xC0,0x00,
0x00,0xF8,0xE0,0x00,0x00,0x00,0xF0,0xF0,
0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xF8,
0x14,0x38,0xF0,0xC0,0x00,0x00,0x00,0x00,
0x00,0x40,0xE0,0x10,0x38,0xC0,0x00,0x00,
0x00,0x08,0x38,0xA0,0x40,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x18,
0x60,0xC0,0x00,0x1C,0x18,0x30,0x70,0xB0,
0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x60,0x18,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x28,0x38,0xC0,0x80,
0x00,0x00,0x00,0x80,0x78,0x0C,0x70,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,(咨询特价)
};
//========================另一个参考程序=================================
// 函数: void LCD_DataWrite(unsigned int Data)
// 描述: 写一个字节的显示数据至LCD中的显示缓冲RAM当中
// 参数: Data 写入的数据
// 返回: 无
// 备注: 无
// 版本:
// 2007/01/09 First version
//==============================================================
void LCD_DataWrite(unsigned char Dat)//,_Fill_Dot_LCD
{
unsigned char Num;
LCD_CS = 0;
LCD_A0 = 1;
for(Num=0;Num<8;Num++)
{
if((Dat&0x80) == 0) LCD_SDI = 0;
else LCD_SDI = 1;
Dat = Dat << 1;
LCD_CLK = 0;
LCD_CLK = 1;
}
LCD_CS = 1;
}
//==========================================================
// 函数: void LCD_RegWrite(unsigned char Command)
// 描述: 写一个字节的数据至LCD中的控制寄存器当中
// 参数: Command 写入的数据,低八位有效(byte)
// 返回: 无
// 备注:
// 版本:
// 2007/01/09 First version
//===============================================================
void LCD_RegWrite(unsigned char Command)
{
unsigned char Num;
LCD_CS = 0;
LCD_A0 = 0;
for(Num=0;Num<8;Num++)
{
if((Command&0x80) == 0) LCD_SDI = 0;
else LCD_SDI = 1;
Command = Command << 1;
LCD_CLK = 0;
LCD_CLK = 1;
}
LCD_CS = 1;
}
//=============================================================
// 函数: void LCD_Fill(unsigned int Data)
// 描述: 会屏填充以Data的数据至各点中
// 参数: Data 要填充的颜色数据
// 返回: 无
// 备注: 仅在LCD初始化程序当中调用
// 版本:
// 2006/10/15 First version
// 2007/01/09 V1.2
//==============================================================
void LCD_Fill(unsigned char Data)
{
unsigned char i,j;
unsigned char uiTemp;
uiTemp = Dis_Y_MAX;
uiTemp = uiTemp>>3;
for(i=0;i<=uiTemp;i++) //往LCD中填充初始化的显示数据
{
LCD_RegWrite(0xb0+i);
LCD_RegWrite(0x01);
LCD_RegWrite(0x10);
for(j=0;j<=Dis_X_MAX;j++)
{
LCD_DataWrite(Data);
}
}
}
//==============================================================
// 函数: void LCD_Init(void)
// 描述: LCD初始化程序,在里面会完成LCD初始所需要设置的许多寄存器,具体如果
// 用户想了解,建议查看DataSheet当中各个寄存器的意义
// 参数: 无
// 返回: 无
// 备注:
// 版本:
// 2006/10/15 First version
// 2007/01/09 V1.2
// 2007/06/27 V(咨询特价)
//================================================================
//延时程序
void TimeDelay(int Time)
{
int i;
while(Time > 0)
{
for(i = 0;i < 800;i++)
{
_nop_();
}
Time --;
}
}
void LCD_Init(void)
{
//LCD驱动所使用到的端口的初始化(如果有必要的话)
TimeDelay(200);
LCD_RES = 0;
TimeDelay(200);
LCD_RES = 1;
TimeDelay(20);
LCD_RegWrite(M_LCD_ON); //LCD On
LCD_RegWrite(M_LCD_POWER_ALL); //设置上电控制模式
LCD_RegWrite(M_LCD_ELE_VOL); //电量设置模狮显示亮度)
LCD_RegWrite(0x1f); //指令数据0x0000~0x003f
LCD_RegWrite(M_LCD_VDD_SET); //V5内部电压调节电阻设置
LCD_RegWrite(M_LCD_VDD); //LCD偏压设置,V3时选
LCD_RegWrite(M_LCD_COM_REV); //Com 扫描方式设置
LCD_RegWrite(M_LCD_SEG_NOR); //Segment方向选择
LCD_RegWrite(M_LCD_ALL_LOW); //全屏点亮/变暗指令
LCD_RegWrite(M_LCD_ALL_NOR); //正向反向显示控制指令
LCD_RegWrite(M_LCD_STATIC_OFF); //关闭静态指示器
LCD_RegWrite(0x00); //指令数据
LCD_RegWrite(M_LCD_BEGIN_LINE); //设置显示起始行对应RAM
LCD_Fill(LCD_INITIAL_COLOR);
}