📄 515654.c
字号:
{
#ifdef LCD_4LINE
LCD_W_CTRL(0x3f);
#else
LCD_W_CTRL(0xaf);
#endif
LCD_W_CTRL(0xc0);
}
//---------------------------------------------------------
// NAME: inputkey()
// ENTRY: a,postion
// RETURN: void
// FUNCTION:密码输入 a星号数
// MODIFY: 2004.2.3
//---------------------------------------------------------
void inputkey(unsigned char a,unsigned char postion)
{
unsigned char p;
if(postion ==1)
p=0;
else
p=2;
switch(a)
{
case 6:
Disp_char_16_8(p,101,0x2a, 0);
case 5:
Disp_char_16_8(p,93,0x2a, 0);
case 4:
Disp_char_16_8(p,85,0x2a, 0);
case 3:
Disp_char_16_8(p,77,0x2a, 0);
case 2:
Disp_char_16_8(p,69,0x2a, 0);
case 1:
Disp_char_16_8(p,61,0x2a, 0);
break;
}
}
//---------------------------------------------------------
// NAME: show_time_set()
// ENTRY: position,permit
// RETURN: void
// FUNCTION:时间设置界面
// MODIFY: 2004.2.3
//---------------------------------------------------------
void show_time_set(unsigned char position,unsigned char permit)
{
unsigned char low,high,temp;
LCD_CLR();
SHOW_ALL_HEAD(13);
Disp_char_16_8(2,0,0x54, 0);
Disp_char_16_8(2,8,0x49, 0);
Disp_char_16_8(2,16,0x4d, 0);
Disp_char_16_8(2,24,0x45, 0);
Disp_char_16_8(2,32,0x3a, 0);
if(permit==1)
read_time_date();
temp = time[2];
low = temp&0x0f;
high = (temp>>4)&0x0f;
Disp_char_16_8(2,44,high+0x30,0 );
Disp_char_16_8(2,52,low+0x30,0 );
Disp_char_16_8(2,61,0,0);
Disp_char_16_8(2,61,0,0);
Disp_char_16_8(2,61,0x3A,0);
temp = time[1];
low = temp&0x0f;
high = (temp>>4)&0x0f;
Disp_char_16_8(2,67,high+0x30,0 );
Disp_char_16_8(2,75,low+0x30,0 );
Disp_char_16_8(2,83,0x3A,0);
temp = time[0];
low = temp&0x0f;
high = (temp>>4)&0x0f;
Disp_char_16_8(2,91,high+0x30,0 );
Disp_char_16_8(2,99,low+0x30,0 );
switch(position)
{
case 1:
temp = time[2];
high = (temp>>4)&0x0f;
Disp_char_16_8(2,44,high+0x30,1 );
break;
case 2:
temp = time[2];
low = temp&0x0f;
Disp_char_16_8(2,52,low+0x30,1 );
break;
case 3:
temp = time[1];
high = (temp>>4)&0x0f;
Disp_char_16_8(2,67,high+0x30,1 );
break;
case 4:
temp = time[1];
low = temp&0x0f;
Disp_char_16_8(2,75,low+0x30,1 );
break;
case 5:
temp = time[0];
high = (temp>>4)&0x0f;
Disp_char_16_8(2,91,high+0x30,1 );
break;
case 6:
temp = time[0];
low = temp&0x0f;
Disp_char_16_8(2,99,low+0x30,1 );
break;
default:
break;
}
}
//---------------------------------------------------------
// NAME: show_key_set()
// ENTRY: position
// RETURN: void
// FUNCTION:密码设置界面
// MODIFY: 2004.2.3
//---------------------------------------------------------
void show_key_set(unsigned char position)
{
unsigned char show;
LCD_CLR();
if(position==1)
show=1;
else
show=0;
Disp_char_16_8(0,2,0x4e, show);
Disp_char_16_8(0,9,0x00, show);
Disp_char_16_8(0,10,0x45, show);
Disp_char_16_8(0,17,0x00, 0);
Disp_char_16_8(0,17,0x57, show);
Disp_char_16_8(0,26,0x3a, 0);
if(position==2)
show=1;
else
show=0;
Disp_char_16_8(2,0,0x52, show);
Disp_char_16_8(2,8,0x45, show);
Disp_char_16_8(2,16,0x50, show);
Disp_char_16_8(2,23,0x00, show);
Disp_char_16_8(2,24,0x45, show);
Disp_char_16_8(2,32,0x41, show);
Disp_char_16_8(2,40,0x54, show);
Disp_char_16_8(2,48,0x3a, 0);
}
//---------------------------------------------------------
// NAME: show_TEMP_set()
// ENTRY: position,dat1,dat2
// RETURN: void
// FUNCTION:温度设置界面
// MODIFY: 2004.2.3
//---------------------------------------------------------
void show_TEMP_set(unsigned char position,unsigned char dat1,unsigned char dat2)
{
unsigned char temp;
unsigned char high,low;
Disp_char_16_8(2,8,0x48, 0);
Disp_char_16_8(2,16,0x3a, 0);
temp=dat1;
low=temp%10;
high=temp/10;
Disp_char_16_8(2,32,high+0x30, 0);
Disp_char_16_8(2,40,low+0x30, 0);
Disp_char_16_8(2,64,0x4c, 0);
Disp_char_16_8(2,70,0x3a, 0);
temp=dat2;
low=temp%10;
high=temp/10;
Disp_char_16_8(2,83,high+0x30, 0);
//Disp_char_16_8(2,83,high+0x30, 0);
Disp_char_16_8(2,91,low+0x30, 0);
//Disp_char_16_8(2,91,low+0x30, 0);
Disp_char_16_8(2,99,0, 0);
Disp_char_16_8(2,107,0, 0);
Disp_char_16_8(2,115,0, 0);
switch(position)
{
case 1:
temp=chg2(dat1);
high = (temp>>4)&0x0f;
Disp_char_16_8(2,32,high+0x30, 1);
break;
case 2:
temp=chg2(dat1);
low = temp&0x0f;
Disp_char_16_8(2,40,low+0x30, 1);
break;
case 3:
temp=chg2(dat2);
high = (temp>>4)&0x0f;
Disp_char_16_8(2,83,high+0x30, 1);
break;
case 4:
temp=chg2(dat2);
low = temp&0x0f;
Disp_char_16_8(2,91,low+0x30, 1);
break;
default:
break;
}
}
//---------------------------------------------------------
// NAME: disp_total()
// ENTRY: void
// RETURN: void
// FUNCTION:显示TOTAL字符串
// MODIFY: 2004.2.3
//---------------------------------------------------------
void disp_total(void)
{
Disp_char_16_8(2,0,0x54, 0);
Disp_char_16_8(2,8,0x30, 0);
Disp_char_16_8(2,16,0x54, 0);
Disp_char_16_8(2,24,0x41, 0);
Disp_char_16_8(2,32,0x4c, 0);
Disp_char_16_8(2,40,0x3a, 0);
}
//---------------------------------------------------------
// NAME: disp_start_stop()
// ENTRY: void
// RETURN: void
// FUNCTION:显示start_stop 字符串
// MODIFY: 2004.2.3
//---------------------------------------------------------
void disp_start_stop(void)
{
Disp_char_16_8(2,0,0x53, 0);
Disp_char_16_8(2,8,0x54, 0);
Disp_char_16_8(2,16,0x41, 0);
Disp_char_16_8(2,24,0x52, 0);
Disp_char_16_8(2,32,0x54, 0);
Disp_char_16_8(2,40,0x3a, 0);
}
//---------------------------------------------------------
// NAME: disp_key()
// ENTRY: void
// RETURN: void
// FUNCTION:显示key 字符串
// MODIFY: 2004.2.3
//---------------------------------------------------------
void disp_key(void)
{
Disp_char_16_8(2,0,0x4b, 0);
Disp_char_16_8(2,8,0x45, 0);
Disp_char_16_8(2,16,0x59, 0);
Disp_char_16_8(2,24,0x3a, 0);
}
//---------------------------------------------------------
// NAME: disp_alarm()
// ENTRY: void
// RETURN: void
// FUNCTION:显示alarm 字符串
// MODIFY: 2004.2.3
//---------------------------------------------------------
void disp_alarm(void)
{
Disp_char_16_8(2,0,0x41, 0);
Disp_char_16_8(2,8,0x4c, 0);
Disp_char_16_8(2,16,0x41, 0);
Disp_char_16_8(2,24,0x52, 0);
Disp_char_16_8(2,32,0x4d, 0);
Disp_char_16_8(2,40,0x3a, 0);
}
//---------------------------------------------------------
// NAME: disp_voltage_trl()
// ENTRY: void
// RETURN: void
// FUNCTION:显示voltage trouble
// MODIFY: 2004.2.3
//---------------------------------------------------------
void disp_voltage_trl(unsigned char ch)
{
SHOW_LOGO(53);
Disp_char_16_8(2,26,ch+0x30, 0);
}
//---------------------------------------------------------
// NAME: disp_temperature()
// ENTRY: void
// RETURN: void
// FUNCTION:显示temperature
// MODIFY: 2004.2.3
//---------------------------------------------------------
void disp_temperature(void)
{
unsigned char alarm=0;
SHOW_LOGO(28);
SHOW_ALL_HEAD(0);
Disp_char_16_8(2,0x03,0x54,0 );
Disp_char_16_8(2,0x0b,0x31,0 );
Disp_char_16_8(2,0x15,0x3A,0 );
if(!CHECK_CHIP(1))
{
Disp_char_16_8(2,0x1F,0x45,0 );
Disp_char_16_8(2,0x27,0x52,0);
Disp_char_16_8(2,0x2F,0x52,0);
alarm=1;
}
else
{
Disp_char_16_8(2,0x1F,0x2b,0 );
Disp_char_16_8(2,0x27,temp_alarm[2]/10+0x30,0);
Disp_char_16_8(2,0x2F,temp_alarm[2]%10+0x30,0 );
Disp_char_16_8(2,0x3d,0,0 );
Disp_char_16_8(2,0x45,0,0 );
Disp_char_16_8(2,0x4d,0,0 );
Disp_char_16_8(2,0x55,0,0 );
}
Disp_char_16_8(2,0x44,0x54,0 );
Disp_char_16_8(2,0x4c,0x32,0 );
Disp_char_16_8(2,0x4c,0x32,0 );
Disp_char_16_8(2,0x54,0x3A,0 );
if(! CHECK_CHIP(2))
{
Disp_char_16_8(2,0x5c,0x45,0 );
Disp_char_16_8(2,0x64,0x52,0);
Disp_char_16_8(2,0x6c,0x52,0);
alarm=1;
}
else
{
Disp_char_16_8(2,0x5c,0x2b,0 );
Disp_char_16_8(2,0x64,temp_alarm1[2]/10+0x30,0);
Disp_char_16_8(2,0x6c,temp_alarm1[2]%10+0x30,0 );
Disp_char_16_8(2,0x6c,temp_alarm1[2]%10+0x30,0 );
}
if(( temperature_h[0]<temp_alarm[0])&&( temperature_h[0]<temp_alarm[1])&&( temperature_h[0]<temp_alarm[2]))
{
alarm=1;
}
if(( temperature_h[1]<temp_alarm1[0])&&( temperature_h[1]<temp_alarm1[1])&&( temperature_h[1]<temp_alarm1[2]))
{
alarm=1;
}
if(alarm) spk_alarm();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -