📄 lcd.c
字号:
{"41-3 PT8 ON 4103"},
{"41-4 Send W00FFFFDA012D"},
{"42-1 PT11 OFF 4201"},
{"42-2 Send B00FFFF6710"},
{"42-3 Send W00FFFFDC0001"},
{"42-4 PT11 ON 4204"},
{"42-5 Send W00FFFFDC012D"},
{"42-6 Send B00FFFF6700"},
{"43-1 RL42 ON"},
{"43-2 Wait 10"},
{"43-3 Send W00FFFEA80001"},
{"43-4 Wait 10"},
{"43-5 Send R00FFFF94"},
{"43-6 Rev AND 00-33 4306"},
{"43-7 Send W00FFFEA80100"},
{"43-8 Wait 10"},
{"43-9 Send R00FFFF94"},
{"43-10 Rev AND 43-FF 4310"},
{"43-11 Send W00FFFEA8012D"},
{"44-1 RL42 OFF"},
{"44-1 RL43 ON"},
{"44-2 Wait 10"},
{"44-3 Send W00FFFEAA0001"},
{"44-4 Wait 10"},
{"44-5 Send R00FFFF94"},
{"44-6 Rev AND 00-33 4406"},
{"44-7 Send W00FFFEAA0096"},
{"44-8 Wait 10"},
{"44-9 Send R00FFFF94"},
{"44-10 Rev AND 45-FF 4410"},
{"44-11 Send W00FFFEAA012D"},
{"44-12 RL43 OFF"},
{"44-13 Wait 10"},
{"45-1 Send B00FFFF611F"},
{"45-2 PT24-27 OFF 4503"},
{"45-7 PT24-27 0110 4508"},
{"45-12 PT24-27 1001 4513"},
{"45-17 PT24-27 OFF 4519"},
{"45-23 Send B00FFFF610F"},
{"46-1 Send B00FFFF6D8F"},
{"46-2 PT16-19 OFF 4603"},
{"46-7 PT16-19 0110 4608"},
{"46-12 PT16-19 1001 4613"},
{"46-17 PT16-19 OFF 4619"},
{"46-23 Send B00FFFF650F"},
{"46-24 Send B00FFFF6D0F"},
{"47-1 Send B00FFFF691F"},
{"47-2 PT20-23 OFF 4703"},
{"47-7 PT20-23 0110 4708"},
{"47-12 PT20-23 1001 4713"},
{"47-17 PT20-23 OFF 4719"},
{"47-23 Send B00FFFF690F"},
{"48-1 Send B00FFFF6A1F"},
{"48-2 PT28-31 OFF 4803"},
{"48-7 PT28-31 0110 4808"},
{"48-12 PT28-31 1001 4813"},
{"48-17 PT28-31 OFF 4819"},
{"48-23 Send B00FFFF6A0F"},
{"49-1 PT36-39 OFF 4902"},
{"49-6 PT36-39 0110 4907"},
{"49-11 PT36-39 1001 4912"},
{"49-16 PT36-39 OFF 4918"},
{"49-22 Send B00FFFF6B0F"},
{"50-1 Send B00FFFF6C1F"},
{"50-2 PT12-15 OFF 5003"},
{"50-7 PT12-15 0110 5008"},
{"50-12 PT12-15 1001 5013"},
{"50-17 PT12-15 OFF 5019"},
{"50-23 Send B00FFFF6C0F"},
{"51-1 Send B00FFFF6D1F"},
{"51-2 PT48-51 OFF 5103"},
{"51-7 PT48-51 0110 5108"},
{"51-12 PT48-51 1001 5113"},
{"51-17 PT48-51 OFF 5119"},
{"51-23 Send B00FFFF6D0F"},
{"52-1 Send B00FFFF6E1F"},
{"52-2 PT40-43 OFF 5203"},
{"52-7 PT40-43 0110 5208"},
{"52-12 PT40-43 1001 5213"},
{"52-17 PT40-43 OFF 5219"},
{"52-23 Send B00FFFF6E0F"},
{"53-1 Send B00FFFF6404"},
{"53-2 PT32-35 OFF 5303"},
{"53-7 PT32-35 0110 5308"},
{"53-12 PT32-35 1001 5313"},
{"53-17 PT32-35 OFF 5319"},
{"53-23 Send B00FFFF6F0F"},
{"53-24 Send B00FFFF6400"},
{"54-1 Send B00FFFF698F"},
{"54-2 PT44-47 OFF 5403"},
{"54-7 PT44-47 0110 5408"},
{"54-12 PT44-47 1001 5413"},
{"54-17 PT44-47 OFF 5419"},
{"54-23 Send B00FFFF720F"},
{"54-24 Send B00FFFF690F"},
{"55-1 Send B00FFFF6204"},
{"55-2 RL11 ON"},
{"55-3 Wait 10"},
{"55-4 Send R00FFFF57"},
{"55-5 Rev AND 2F=2E 5505"},
{"55-6 RL11 OFF"},
{"55-7 Wait 20"},
{"55-8 RL12 ON"},
{"55-9 Wait 10ms"},
{"55-10 RL12 OFF"},
{"55-11 Wait 20ms"},
{"55-12 Send R00FFFF57"},
{"55-13 Rev And 2F=2E 5506"},
{"55-14 RL12 ON"},
{"55-15 Wait 20"},
{"55-16 Send R00FFFF57"},
{"55-17 Rev AND 2F=26 5513"},
{"55-18 RL12 OFF"},
{"55-19 Send B00FFFF6200"},
{"55-20 Wait 10"},
{"55-21 Send R00FFFF57"},
{"55-22 Rev AND 2F=2E 5517"},
{"56-1 Send B00FFFE2405"},
{"56-2 Send F1000FAA"},
{"56-3 Send E1000F"},
{"56-4 Rev AND FF=AA 5604"},
{"56-5 Send F1000F00"},
{"56-6 Send E1000F"},
{"56-7 Rev AND FF=00 5607"},
{"56-8 Send B00FFFE2407"},
{"57-1 TACTON 4 ON"},
{"57-2 Wait 10"},
{"57-3 Send R00FFFF54"},
{"57-4 Rev AND 08=00 5704"},
{"57-5 TACTOFF 4 OFF"},
{"57-6 Wait 10"},
{"57-7 Send R00FFFF54"},
{"57-8 Rev AND 08=08 5708"},
{"58-1 Send W00FFFFB70047"},
{"58-2 MANUL"},
{"58-3 Send W00FFFFB70000"},
{"59-1 Send M000F00"},
{"59-2 Send L000F"},
{"59-3 Rev AND FF=00 5903"},
{"59-4 Send M007EAA"},
{"59-5 Send L007E"},
{"59-6 Rev AND FF=AA 5906"},
{"59-7 Send M007F55"},
{"59-8 Send L007F"},
{"59-9 Rev AND FF=55 5909"},
{"59-10 Send M03FF01"},
{"59-11 Send L03FF"},
{"59-12 Rev AND FF=01 5912"},
{"60-1 RL1 OFF"},
{"60-1 RL3 OFF"},
{"60-1 RL4 OFF"},
{"60-1 RL5 OFF"},
{"60-1 RL6 OFF"},
{"60-1 RL7 OFF"},
{"60-1 RL2 ON"},
{"60-2 Wait 1000"},
{"60-3 RL2 OFF"}
};
unsigned char code asc[]={
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x38,0xfc,0xfc,0x38,0x0,0x0,0x0,0x0,0x0,0xd,0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0,
0x0,0x0,0x0,0xbc,0xbc,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xf,0x0,0x0,0x0,
0x0,0x4,0x4,0xbc,0xf8,0x40,0x40,0x0,0x0,0x8,0x8,0xf,0x7,0x0,0x0,0x0,
0x8,0xc,0x4,0xc,0x8,0xc,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x80,0xc0,0x60,0x30,0x60,0xc0,0x80,0x0,0x7,0x7,0x4,0x4,0x4,0x7,0x7,0x0
};
//DISPLAY ON/OFF
//==================================================================================================
//Sleep time Program STRAT
void nc(int n);
void delay(int n);
void delay_nc(int t);
void long_delay(int t);
//Sleep time Program STOP
//==================================================================================================
//==================================================================================================
//MUC INI INIT START
void int_init(void);
void config_init(void);
void port_init(void);
//MUC INI INIT START
//==================================================================================================
//==================================================================================================
void incept_int(void);
void Send_String(char Str_Array[],BYTE Int_Len);//MCU RS23 SEND N BYTES
void Send(char chrI);//MCU RS23 SEND BYTE
//==================================================================================================
//================================================================================
Write_0107_Reg(unsigned char Reg_Code);// KS0107寄存器写入函数
Write_0107_Data(unsigned char Disp_Data);// KS0107显示数据写入函数
unsigned char Read_0107_Data();// 读取KS0107显示数据函数
void Set_XY_1(unsigned char X_Column, unsigned char Y_Page);// 设置地址,X方向以点为单位,Y方向以page为单位
void Init_0107();// KS0107寄存器初始化函数
void lcd_busy(void);//忙判别
void set_xy(unsigned char x,unsigned char y);//设置xy
void lw(unsigned char x,unsigned char y,unsigned char dd);
void display_string(unsigned char x,unsigned char y,unsigned char n,unsigned char fb,unsigned char *dis_string);
void da(unsigned char x,unsigned char y,unsigned char n,unsigned char fb);
//================================================================================
void delay(int n)
{
unsigned int k,j;
for(k=0;k<n;k++)
for(j=0;j<200;j++);
}
void long_delay(int t)
{
int n=0xff;
while(--t)
{
while(--n);
n=0xff;
}
}
void delay_nc(int t)
{
while(--t);
}
void nc(int n)
{
unsigned int i;
for(i=0;i<n;i++)
_nop_();
}
//================================================================
// KS0108寄存器写入函数
//================================================================
Write_0107_Reg(unsigned char Reg_Code)
{
bRWE=1;
bDI=0;
bRW=0;
nc(5);
Lcd_Bus=Reg_Code;
nc(5);
bRWE=0;
nc(2);
}
//================================================================
// KS0108显示数据写入函数
//================================================================
Write_0107_Data(unsigned char Disp_Data)
{
bRWE=1;
bDI=1;
bRW=0;
nc(2);
Lcd_Bus=Disp_Data;
nc(5);
bRWE=0;
nc(2);
}
//================================================================
// 读取KS0107显示数据函数
//================================================================
unsigned char Read_0107_Data()
{
unsigned char Disp_Data;
bDI=1;
bRW=1;
Lcd_Bus=0xff;
nc(2);
bRWE=1;
Disp_Data=Lcd_Bus;
nc(4);
bRWE=0;
nc(2);
return Disp_Data;
}
//================================================================
// 设置地址,X方向以点为单位,Y方向以page为单位
//================================================================
void Set_XY_1(unsigned char X_Column, unsigned char Y_Page)
{
Write_0107_Reg(Set_Page+Y_Page);
nc(10);
Write_0107_Reg(Set_Column+X_Column);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -