(完整word版)DS1302时钟芯片51单片机c语言程序.pdf
-
资源ID:55053083
资源大小:41.25KB
全文页数:5页
- 资源格式: PDF
下载积分:4.3金币
快捷下载
会员登录下载
微信登录下载
三方登录下载:
微信扫一扫登录
友情提示
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
|
(完整word版)DS1302时钟芯片51单片机c语言程序.pdf
#ifndef _DS1302_H_#define _DS1302_H_#define uchar unsigned char#define uint unsigned int#include sbit SCLK=P32;sbit IO=P24;sbit RST=P33;#define R_Second 0 x81#define W_Second 0 x80#define R_Minute 0 x83#define W_Minute 0 x82#define R_Hour 0 x85#define W_Hour 0 x84#define R_Day 0 x87#define W_Day 0 x86#define R_Month 0 x89#define W_Month 0 x88#define R_Week 0 x8B#define W_Week 0 x8A#define R_Year 0 x8D#define W_Year 0 x8C#define R_Control 0 x8F#define W_Control 0 x8E void DS1302_Write_Byte(uchar Date);uchar DS1302_Read_Byte();void Write_DS1302(uchar Adr,uchar Date);uchar Read_DS1302(uchar Adr);void Init_DS1302();#endif 精品资料-欢迎下载-欢迎下载 名师归纳-第 1 页,共 5 页 -#include ds1302.h/*函數名稱:DS1302_Write_Byte(uchar Date)函數功能:单字节写輸入參數:写的字节輸出參數:无備注:*/void DS1302_Write_Byte(uchar Date)uchar i;for(i=0;i 1;SCLK=0;/*函數名稱:uchar DS1302_Read_Byte()函數功能:单字节读輸入參數:无輸出參數:读出的数据備注:*/uchar DS1302_Read_Byte()精品资料-欢迎下载-欢迎下载 名师归纳-第 2 页,共 5 页 -文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4uchar i,Temp=0;for(i=0;i 1;SCLK=0;if(IO=1)Temp=Temp|0 x80;SCLK=1;return Temp;/*函數名稱:Write_DS1302(uchar Adr,uchar Date)函數功能:写数据輸入參數:写的寄存器地址和数据輸出參數:无備注:*/void Write_DS1302(uchar Adr,uchar Date)RST=0;SCLK=0;RST=1;DS1302_Write_Byte(Adr);DS1302_Write_Byte(Date);RST=0;/*函數名稱:uchar Read_DS1302(uchar Adr)精品资料-欢迎下载-欢迎下载 名师归纳-第 3 页,共 5 页 -文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4函數功能:读数据輸入參數:写的寄存器地址輸出參數:读出的数据備注:*/uchar Read_DS1302(uchar Adr)uchar Temp=0;RST=0;SCLK=0;RST=1;DS1302_Write_Byte(Adr);Temp=DS1302_Read_Byte();RST=0;Temp=Temp/16*10+Temp%16;return Temp;/*函數名稱:Init_DS1302()函數功能:初始化 DS1302 輸入參數:无輸出參數:无備注:*/void Init_DS1302()Write_DS1302(W_Control,0 x00);Write_DS1302(W_Year,0 x11);Write_DS1302(W_Week,0 x06);Write_DS1302(W_Month,0 x09);Write_DS1302(W_Day,0 x10);Write_DS1302(W_Hour,0 x16);Write_DS1302(W_Minute,0 x11);精品资料-欢迎下载-欢迎下载 名师归纳-第 4 页,共 5 页 -文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4Write_DS1302(W_Second,0 x23);Write_DS1302(W_Control,0 x80);精品资料-欢迎下载-欢迎下载 名师归纳-第 5 页,共 5 页 -文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4文档编码:CF8N10G7N4F5 HE1K1R9F1C9 ZY6H8D9A1Q4