if(key1==0)
{ W1302(DS1302_SECOND,0x80);
delay(5);
if(key1==0)
{
key1_count++;
while(!key1);
switch(key1_count)
{
case 1: lcd_pod(3,3);
wcode(0x0f);
break;
case 2: lcd_pos(3,4);
wcode(0x0f);
break;
case 3: lcd_pos(3,6);
break;
// case 4:
}
}
}
if(key1_count!=0)
{
if(key2==0)
{
delay(5);
if(key2==0)
{
while(!key2);
switch(key1_count)
{
case 1:if(++CurrentTime.Second>59) CurrentTime.Second=0;
break;
case 2:if(++CurrentTime.Minute>59) CurrentTime.Minute=0;
break;
case 3:if(++CurrentTime.Hour>23) CurrentTime.Hour=0;
break;
case 4:if(++CurrentTime.Year>99) CurrentTime.Year=0;
break;
case 5:if(++CurrentTime.YearH>99) CurrentTime.YearH=0;
break;
case 6:if(++CurrentTime.Month>11) CurrentTime.Month=0;
break;
case 7:if(++CurrentTime.Day>30) CurrentTime.Day=0;
}
}
}
if(key3==0)
{
delay(5);
if(key3==0)
{
while(!key3);
switch(key1_count)
{
case 1:if(CurrentTime.Second--==0) CurrentTime.Second=59;
break;
case 2:if(CurrentTime.Minute--==0) CurrentTime.Minute=59;
break;
case 3:if(CurrentTime.Hour--==0) CurrentTime.Hour=23;
break;
case 4:if(CurrentTime.Year--==0) CurrentTime.Year=99;
break;
case 5:if(CurrentTime.YearH--==0) CurrentTime.YearH=99;
break;
case 6:if(CurrentTime.Month--==0) CurrentTime.Month=12;
break;
case 7:if(CurrentTime.Day--==0) CurrentTime.Day=30;
}