基于C8051F的AD UART0 KEY FLASH TIME3程序
if(BGset>
if(k>
if(Page>
if(!(Mkey&0x08)) //SW5按下吗?右移->
if(direction >
if(keybuffer[0]>
if(Tset>
if(keybuffer[1]>
if(Tset>
if(keybuffer[2]>
if(Tset>
if(keybuffer[3]>
if(Tset>
if(keybuffer[4]>
if(Tset>
if(keybuffer[5]>
if(Tset>
Between[18] = PC1>>
Between[18] = PF1>>
if(PdownCount >
Between[18] = PC1>>
if(PdownCount >
Between[18] = PF1>>
(1,0,0x95,1,TAB[TT1],TAB[TT2]);
number_disp (1,0,0x96,1,0x2e,TAB[TT3]);
number_disp (1,0,0x97,1,0x4b,0x57);
Pchange(PF1);
number_disp (0,1,0x94,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x95,1,TAB[TT1],TAB[TT2]);
number_disp (0,1,0x96,1,0x2e,TAB[TT3]);
number_disp (0,1,0x97,1,0x4b,0x57);
Page1=Page;
}break;
case 3: //显示历史充电记录
{
string_disp (1,0,0x80,12,tab5); //
//第1条信息
if((CPT_c[0]>99)||(CPT_c[1]>12)||(CPT_c[2]>31))
{
string_disp (1,0,0x90,8,tab9);
} //如果读取时间不对,显示“暂无记录”
else
{
number_disp (1,0,0x90,1,0x32,0x30); //0送显示
TH = CPT_c[0]/10;
TL = CPT_c[0]%10;
number_disp (1,0,0x91,1,TAB[TH],TAB[TL]);
number_disp (1,0,0x92,1,0xc4,0xea); //年
TH = CPT_c[1]/10;
TL = CPT_c[1]%10;
number_disp (1,0,0x93,1,TAB[TH],TAB[TL]);
number_disp (1,0,0x94,1,0xd4,0xc2); //月
TH = CPT_c[2]/10;
TL = CPT_c[2]%10;
number_disp (1,0,0x95,1,TAB[TH],TAB[TL]);
number_disp (1,0,0x96,1,0xc8,0xd5); //日
PDIS = CPT_c[12];
PDIS = PDIS<8 + CPT_c[13];
Pchange(PDIS);
number_disp (1,0,0x98,1,TAB[TH],TAB[TL]);
number_disp (1,0,0x99,1,TAB[TT1],TAB[TT2]);
number_disp (1,0,0x9A,1,0x2e,TAB[TT3]);
number_disp (1,0,0x9B,1,0x4b,0x57);
}
//第2条信息
if((CPT_c[3]>99)||(CPT_c[4]>12)||(CPT_c[5]>31))
{
string_disp (0,1,0x80,8,tab9);
} //如果读取时间不对,显示“暂无记录”
else
{
number_disp (0,1,0x80,1,0x32,0x30); //0送显示
TH = CPT_c[3]/10;
TL = CPT_c[3]%10;
number_disp (0,1,0x81,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x82,1,0xc4,0xea); //年
TH = CPT_c[4]/10;
TL = CPT_c[4]%10;
number_disp (0,1,0x83,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x84,1,0xd4,0xc2); //月
TH = CPT_c[5]/10;
TL = CPT_c[5]%10;
number_disp (0,1,0x85,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x86,1,0xc8,0xd5); //日
PDIS = CPT_c[14];
PDIS = PDIS<8 + CPT_c[15];
Pchange(PDIS);
number_disp (0,1,0x88,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x89,1,TAB[TT1],TAB[TT2]);
number_disp (0,1,0x8A,1,0x2e,TAB[TT3]);
number_disp (0,1,0x8B,1,0x4b,0x57);
}
//第3条信息
if((CPT_c[6]>99)||(CPT_c[7]>12)||(CPT_c[8]>31))
{
string_disp (0,1,0x90,8,tab9); //如果读取时间不对,显示“暂无记录”
}
else
{
number_disp (0,1,0x90,1,0x32,0x30); //0送显示
TH = CPT_c[6]/10;
TL = CPT_c[6]%10;
number_disp (0,1,0x91,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x92,1,0xc4,0xea); //年
TH = CPT_c[7]/10;
TL = CPT_c[7]%10;
number_disp (0,1,0x93,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x94,1,0xd4,0xc2); //月
TH = CPT_c[8]/10;
TL = CPT_c[8]%10;
number_disp (0,1,0x95,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x96,1,0xc8,0xd5); //日
PDIS = CPT_c[16];
PDIS = PDIS<8 + CPT_c[17];
Pchange(PDIS);
number_disp (0,1,0x98,1,TAB[TH],TAB[TL]);
number_disp (0,1,0x99,1,TAB[TT1],TAB[TT2]);
number_disp (0,1,0x9A,1,0x2e,TAB[TT3]);
number_disp (0,1,0x9B,1,0x4b,0x57);
}
Page1=Page;
}break;
case 4: //显示历史放电记录
{
string_disp (1,0,0x80,12,tab6); //
//第1条信息
if((FPT_c[0]>99)||(FPT_c[1]>12)||(FPT_c[2]>31)) //如果读取时间不对,显示“暂无记录”
{
string_disp (1,0,0x90,8,tab9);
}
else
{
number_disp (1,0,0x90,1,0x32,0x30); //0送显示
TH = FPT_c[0]/10;
TL = FPT_c[0]%10;
number_disp (1,0,0x91,1,TAB[TH],TAB[TL]);
number_disp (1,0,0x92,1,0xc4,0xea); //年
TH = FPT_c[1]/10;
TL = FPT_c[1]%10;
number_disp (1,0,0x93,1,TAB[TH],TAB[TL]);
number
C8051FADUART0TIME 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)