pic16f877a c语言时钟程序
点击数:7778 次 录入时间:03-04 11:51:34 整理:http://www.55dianzi.com PIC单片机
CurrentDate.year1++;
}
else
CurrentDate.year2++;
}
else
CurrentDate.year3++;
}
else
CurrentDate.year4++;
}
else if(CurrentDate.monthl == 9)
{
CurrentDate.monthl = 0;
CurrentDate.monthh++;
}
else
CurrentDate.monthl++;
}
else if(CurrentDate.dayl == 9)
{
CurrentDate.dayl=0;
CurrentDate.dayh++;
}
else
CurrentDate.dayl++;
}
else
CurrentTime.hourl++;
}
else
CurrentTime.minuteh++;
}
else
CurrentTime.minutel++;
}
else
CurrentTime.secondh++;
}
else
CurrentTime.secondl++;
if ((Alarm1Alarm == false) & (Alarm2Alarm == false))
{
led = 0;
CCP1CON = PWM_off;
}
else
{
if (led == 1)
{
led = 0;
PR2 = PWM_period; // set pwm period
CCPR1L = PWM_DC; // set pwm duty cycle
//CCP1CON = PWM_on;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] 下一页
本文关键字:程序 C语言 PIC单片机,单片机-工控设备 - PIC单片机