2、編程函數(shù)說明:1)In(x): 當(dāng) In(x)函數(shù)返回 0 時(shí)就說明第 x 個(gè)輸入點(diǎn)有信號;
2)out_bit(x,0):打開第 X 點(diǎn)輸出;
3)out_bit(x,1):關(guān)斷第 X 點(diǎn)輸出;
4)get_key(x): 取按鍵 X 的值;
5)Write_Eeprom_S(unsigned int W_addr,unsigned long your_data,unsigned char bytenum); 寫EEPROM
6)Read_Eeprom_single(unsigned int R_addr,unsigned char bytenum); 讀 EEPROM
7)LcdInit(void); LCD 初始化函數(shù)
8)LcdClr(void); LCD 清屏函數(shù)(寫入空值清零 0x20)
9)LcdClr1(void); LCD 清屏函數(shù)(指令清零 0x01)
10)Disp_str(unsigned char x,bit y,unsigned char *p,unsigned char b); 顯示字符串函數(shù)
11)Disp_char(unsigned char x,bit y,unsigned char d); 顯示字符函數(shù)
12)Disp_num(unsigned char x,bit y,unsigned char d); 顯示數(shù)字函數(shù)
13)Disp_int(unsigned char x,bit y,unsigned long your_data,unsigned char bit_T); 顯示整數(shù)
14)Disp_float(unsigned char x,bit y,unsigned long your_data,unsigned char bit_T,unsigned char bit_int);顯示浮點(diǎn)型數(shù)值函數(shù)
15)GetSeconds(void); 取秒鐘值
16)GetMinutes(void); 取分鐘值
17)GetHours(void); 取小時(shí)值
18)GetDate(void); 取星期值
19)GetDay(void); 取日期值
20)GetMonth(void); 取月值
21)GetYear(void); 取年值
22)Init1302(void); 時(shí)鐘初始化
23)SetTime(unsigned char chSeconds,unsigned char chMinutes,unsigned char chHours); 設(shè)置時(shí)間
24)SetDate(unsigned char chDay,unsigned char chMonth,unsigned char chDate,unsigned char chYear); 設(shè)置日期