您好,歡迎來電子發(fā)燒友網(wǎng)! ,新用戶?[免費注冊]

您的位置:電子發(fā)燒友網(wǎng)>源碼下載>驅(qū)動程序>

時鐘芯片ds12c887的C51驅(qū)動程序

大小:5.69 MB 人氣: 2011-06-03 需要積分:0

文件名稱:ds12c887.c
適用范圍:時鐘芯片ds12c887的驅(qū)動程序
*************************************************************/
#i nclude
/* 命令常量定義*/
#define CMD_START_DS12C887 0x20 /* 開啟時鐘芯片
*/
#define CMD_START_OSCILLATOR 0x70 /* 開啟振蕩器,
處于抑制狀態(tài)*/
#define CMD_CLOSE_DS12C887 0x30 /* 關(guān)掉時鐘芯片
*/
/* 所有的置位使用或操作,清除使用與操作*/
#define MASK_SETB_SET 0x80 /* 禁止刷新*/
#define MASK_CLR_SET 0x7f /* 使能刷新*/
#define MASK_SETB_DM 0x04 /* 使用HEX格式
*/
#define MASK_CLR_DM 0xfb /* 使
用BCD碼格式*/
#define MASK_SETB_2412 0x02 /* 使
用24小時模式*/
#define MASK_CLR_2412 0xfd /* 使用12小時模
式*/
#define MASK_SETB_DSE 0x01 /* 使用夏令時*/
#define MASK_CLR_DSE 0xfe /* 不使用夏令時
*/
/* 寄存器地址通道定義*/
xdata char chSecondsChannel _at_ 0xdf00;
xdata char chMinutesChannel _at_ 0xdf02;
xdata char chHoursChannel _at_ 0xdf04;
xdata char chDofWChannel _at_ 0xdf06;
xdata char chDateChannel _at_ 0xdf07;
xdata char chMonthChannel _at_ 0xdf08;
xdata char chYearChannel _at_ 0xdf09;

?

非常好我支持^.^

(9) 100%

不好我反對

(0) 0%

      發(fā)表評論

      用戶評論
      評價:好評中評差評

      發(fā)表評論,獲取積分! 請遵守相關(guān)規(guī)定!

      ?