?? armok0137249.txt
字號:
#include <stdio.h>
#include <stdlib.h>
#include <avr/io.h>
#include "usart.c"
#include "hd44780.h"
#include "ds1302.c"
unsigned char alarm_1_set, alarm_2_set, alarm_3_set;
unsigned char b10;
unsigned char bpm;
/**************************************************************************************/
//函數(shù)名 :main
//屬性 :私有
//功能 :主函數(shù)
//輸入?yún)?shù) :
//輸出參數(shù) :
//返回值 :
//修改日期 :
//修改人 :
/**************************************************************************************/
int main(void)
{
unsigned char hour,min, sec, temp1, temp2,temp3;
unsigned char test[]="Nowtime is :";
min=0;
sec = 0;
hour=0;
//init_usart();
initgraph();
write_byte(w_protect,0x00); //make sure that the WP bit is cleared
//write_byte(sec_w,0x00); //set seconds to 0
while (1)
{
temp1 = sec;
temp2 = min;
temp3=hour;
sec = read_byte(sec_r); //read the seconds
min = read_byte(min_r); //read the minites
hour = read_byte(hour_r); //read the minites
gotoxy(0,0);
outtext(test);
/*
if(sec != temp1)
{
//printf("now time is: %u : %u", min,sec);
printf("now time is :");
printf("\r");
if(sec<10)
{
printf("%u : 0%u",min,sec);
printf("\r");
}
printf("%u : %u : %u",hour,min,sec);
printf("\r");
}
*/
gotoxy(0,1);
delay_nms(10);
put_char('0'+hour/10);
put_char('0'+hour%10);
put_char(':');
put_char('0'+min/10);
put_char('0'+min%10);
put_char(':');
put_char('0'+sec/10);
put_char('0'+sec%10);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -