大香蕉大香蕉在线播放-日韩av在线一区中文字幕-日韩熟女熟妇久久精品综合-精品免费视频一区二区三区

技術(shù)熱線: 4007-888-234
設(shè)計開發(fā)

專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命

開發(fā)工具

提供開發(fā)工具、應(yīng)用測試 完善的開發(fā)代碼案例庫分享

技術(shù)支持

從全面的產(chǎn)品導(dǎo)入到強大技術(shù)支援服務(wù) 全程貼心伴隨服務(wù),創(chuàng)造無限潛能!

新品推廣

提供新的芯片及解決方案,提升客戶產(chǎn)品競爭力

新聞中心

提供最新的單片機資訊,行業(yè)消息以及公司新聞動態(tài)

用PIC16F877的c語言寫的一個時鬧鐘程序

更新時間: 2019-03-26
閱讀量:2379

// FileName: Main.c // MCU: Microchip PIC16F877 // Tool: CCS-C compiler // Author: KingEDA, MSN:kingeda@163.com, skype:kingeda, E-mail:kingeda@163.com // Website: http://www.EDAKING.com // Description: // A timer program // Ver 0.1: 2003-03-31, all clock function with date display, 2 way alarm. // Ver 0.2: 2003-05-05, (1) Alarm default is on,modify alarm1 time to 7:00:00, // and alarm2 to 13:30:00. // (2) Backlight will be enabled when alarming. // (3) Automatic adjust day(28,30,31). // (4) Automatic move cursor to next location when set item. // PIN Connection: // RC0~1 : 32768Hz crystal // RC2 : Buzzer // RC3 : LCD Back Light,drive a PNP BJT // RD0~RD7 : to LCD DB0~DB7 // RA0~RA3 : keypad col in // RC4~RC7 : keypad line out // 7 8 9 # // 4 5 6 ↑ // 1 2 3 ↓ // 0 ← → * // RE0 : LCD RS // RE1 : LCD RW // RE2 : LCD E #include "my16f877.h" #device ICD=true //#fuses HS,NOWDT,NOPROTECT,PUT,BROWNOUT #use delay(clock = 24000000) //#use fast_io(C) #use fast_io(E) #define 

lcd_busy (lcd_read_addr()&0x80) == 0x80 #define time_start_addr 0x80+0x04 #define time_hourh_addr time_start_addr #define time_hourl_addr time_start_addr+1 #define time_minuteh_addr time_start_addr+3 #define time_minutel_addr time_start_addr+4 #define time_secondh_addr time_start_addr+6 #define time_secondl_addr time_start_addr+7 #define key_0 0x11 #define key_1 0x21 #define key_2 0x22 #define key_3 0x24 #define key_4 0x41 #define key_5 0x42 #define key_6 0x44 #define key_7 0x81 #define key_8 0x82 #define key_9 0x84 #define key_left 0x12 #define key_right 0x14 #define key_up 0x48 #define key_down 0x28 #define key_mode 0x18 #define key_cancel 0x88 char 

StrPower1[] = " * Power on * "; char StrSetTime[] = " * Adjust time* "; char StrSetDate[] = " * Adjust date* "; char StrAlarm1[] = " * Set alarm 1* "; char StrAlarm2[] = " * Set alarm 2* "; unsigned char PORTC_MAP; #bit BackLightEn = PORTC_MAP.3 unsigned char BackLightTimer; int1 led; #bit lcd_rs = PORTE.0 #bit lcd_rw = PORTE.1 #bit lcd_e = PORTE.2 #byte lcd_bus = PORTD #byte lcd_dir = TRISD #define PWM_on 0x0c #define PWM_off 0x00 #define PWM_period 200 #define PWM_DC 100 unsigned char lcd_addr; unsigned char KeyLine; unsigned char KeyOld; unsigned char KeyNew; struct mTime { unsigned char hourh; // hour,0~23 unsigned char hourl; unsigned char minuteh; // minute,0~59 unsigned char minutel; unsigned char secondh; // second,0~59 unsigned char secondl; }; struct mTime CurrentTime = {1,2,0,0,0,0}; struct mTime AlarmTime1 = {0,7,0,0,0,0}; // 07:00:00 

struct mTime AlarmTime2 = {1,3,3,0,0,0}; // 13:30:00 unsigned char AlarmStatus; #bit Alarm1Enable = AlarmStatus.0 #bit Alarm2Enable = AlarmStatus.1 #bit Alarm1Alarm = AlarmStatus.2 #bit Alarm2Alarm = AlarmStatus.3 unsigned char Alarm1Cnt; // alarm1 second count unsigned char Alarm2Cnt; unsigned char CurrentMode; #define mode_time 0 #define mode_set_time 1 #define mode_set_date 2 #define mode_set_alarm1 3 #define mode_set_alarm2 4 unsigned char adjust_item; struct mDate { unsigned char year1; // unsigned char year2; unsigned char year3; unsigned char year4; unsigned char monthh; unsigned char monthl; unsigned char dayh; unsigned char dayl; }; struct mDate CurrentDate = {2,0,0,3,0,1,0,1}; unsigned char *pStr; // -


日韩毛片一区视频免费在线观看 | 3色w九九久久男人皇宫宕| 日本精品高清在线观看| 男人扒开女人腿狂躁免费| 亚洲成国产人片在线观看| 精品日韩欧美精品日韩| 精品麻豆亚洲欧美| 精品一区二区三区乱码中文字幕| 性一交一乱一乱一区二区| 日韩毛片一区视频免费在线观看 | 大鸡巴插我在线观看| 国产精品一区二区三区色噜噜| 亚洲一区二区三区日本在线| 午夜无码a级毛片| 中文字幕日韩亚洲| 操美女干逼调教捆绑视频| 91性潮久久久久久久久| 骚逼被狂插视频教程| 联系附近成熟妇女| 三级片成人京东热五月天| 猛哥操女人B视频| 国产精品久久久69粉嫩| 精品无码一区二区三区无码| 美女亚洲福利视频| 男插女下面高潮视频| 99久久久国产精品k影| 60秒动态视频在线观看| 国产精品亚洲一区二区三区极品 | 啊啊啊啊大鸡巴操我视频 | 久久久中文字幕在线视频| 欧美高清在线观看一区二区三区| 69国产成人综合久久精| 黑大吊肏小騷逼噴水| 国产裸体视频BBBBB| 小嫩骚逼操死你视频| 亚洲国际精品一区二区| 五月天国产成人免费视频| 国产午夜高清无码一级片| 大波美女被插的好爽| 波多野结衣浴尿解禁在线| 亚洲免费福利视频|