Void delayms (uint XMS)
{
Uint I, J;
For (I = XMS; I> 0; I --)
For (j = 110; j> 0; j --);
}
Void t0_time () interrupt 1
{
Th0 = (65536-45872)/256; // reinstall the Initial Value
Tl0 = (65536-45872) % 256;
Num1 ++;
If (num1 = 4) // if it reaches 4 times, the time of MS is reached.
{
Num1 = 0; // then, num1 clears 0 and counts four times again.
Led1 = ~ Led1; // reverse the led state
}
}
Void t1_time () interrupt 3
{
Th1 = (65536-45872)/256; // reinstall the Initial Value
TL1 = (65536-45872) % 256;
Num2 ++;
If (num2 = 200) // if it reaches 20 times, the time from 1 second
{
Num2 = 0; // clear 0, then time
Num ++;
If (num = 60) // 0 to 60
Num = 0;
Shi = num/10;
GE = num % 10;
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.