- 3
- 0
- 约1.02万字
- 约 25页
- 2017-07-29 发布于河南
- 举报
时钟芯片ds1302 的程序(Clock chip DS1302 procedures)
时钟芯片ds1302 的程序(Clock chip DS1302 procedures)
Clock chip DS1302 program (jyh.h header file)
Release date: June 26, 2003
Number of clicks: 7753
Details: clock chip DS1302 program (jyh.h header file)
#include
#include
#include
#include
#define uchar unsigned char
#define uint unsigned int
#define byte unsigned char
#define word unsigned int
Extern void Set1302 (uchar *); / * * / time setting
Extern void Get1302 (uchar curtime[]); / * * / 1302 read the current time
Extern, void, Bcd2asc (uchar, uchar *);
Clock chip DS1302 procedures
Release date: June 26, 2003
Number of clicks: 12353
Details: clock chip DS1302 procedures
/*********************************************************************
Corporate name:
Module name: DS1302.c
Function: real time clock module, clock chip type: DS1302
Explain:
Program design: zhaojunjie
Design time: 2002.03.02
Version number:*********************************************************************/
#include
Sbit T_CLK = P2^7; / * * / real time clock clock pin
Sbit T_IO = P1^4; / * * / data line real-time clock pin
Sbit T_RST = P1^5; / * * / line real-time clock reset pin
Sbit ACC0 = ACC^0;
Sbit ACC7 = ACC^7;
Void RTInputByte (uchar); / * * / 1Byte input
Uchar RTOutputByte (void); / * * / 1Byte output?
Void W1302 (uchar, uchar);
Uchar R1302 (uchar);
Void Set1302 (uchar *); / * * / time setting
Void Bcd2asc (uchar, uchar *);
Void Get1302 (uchar curtime[]); / * * / 1302 read the current time
/********************************************************************
Function name: RTInputByte ()
Function: real time clock writes a byte
Description: writes 1Byte data to DS1302 (internal function)
Entry parameter: data written by D
Return value: None
Design: zhaojunjie date: 2002-03-19
Modification: date:
***********************************************************************/
Void RTInputByte (uchar d)
{
Uchar i;
ACC = d;
For (i=8; i0; i--)
{
T_IO = ACC0; / * equivalent to the compilation of the RRC * /
T_CLK = 1;
t_clk = 0;
ACC = 1;
}
}
/ *
您可能关注的文档
- 可怕的渠道——浅谈当今空调市场的渠道战(Terrible channel -- Talking about the channel warfare in the air conditioner market).doc
- 可怕的渠道--浅谈当今空调市场的渠道战(Terrible channel -- Talking about the channel warfare in the air conditioner market).doc
- 初中生四级台阶速读训练法模式构建_4622(_4622 model of the four steps of fast reading training method of junior middle school students).doc
- 养猪户勇夺新地王 美林基业临资金大考(Farmers won the new Wang Meilin foundation on money exams).doc
- 卿云楼主——王玉蓉(Qingyun landlord -- Wang Yurong).doc
- 冒险王三安光电企业培训两年融资150亿(King of adventure Sanan optoelectronics two years training in enterprise financing 15 billion).doc
- 双11电商大战背后的仓库总动员(Double 11 electricity supplier war behind the warehouse mobilization).doc
- 写意是写意形(Freehand brushwork is written in the form of meaning).doc
- 外来妹南下探路打工第一镇引领民工潮(Foreign sister South Pathfinder, working first town to lead the tide of migrant workers).doc
- 嗒嗒的促销故事(Blah promotional story).doc
- 明州之战(Battle of the state).doc
- 春城昆明为何成为中国最具魅力之城(Spring city Kunming why become the most attractive city of Chinese).doc
- 春节张家界美食攻略(Zhangjiajie Food Festival).doc
- 春节深圳经广州长沙张家界到凤凰自驾游路书(The Spring Festival in Shenzhen by the Guangzhou Changsha Zhangjiajie to Phoenix Road car).doc
- 晋国(Jin state during Spring and Autumn period).doc
- 普通话异读词审音表(The variants in Putonghua pronunciation table).doc
- 旋喷桩施工工艺(Construction technology of rotary jet grouting pile).doc
- 普通高中信息技术学业水平考试-9(General high school information technology proficiency test -9).doc
- 景观美学的自律与他律(The autonomy and heteronomy of landscape aesthetics).doc
- 景区景点(Scenic spots).doc
最近下载
- 老无所“依”丨青山资本2025年度研究报告.docx
- 2024版2026春新教科版科学三年级下册全册教案教学设计.docx
- 公务员(省考)试题含答案详解【A卷】.docx VIP
- 信捷DS3-DS3E-DS3L系列伺服驱动器用户使用手册.pdf
- 2026年店铺运营工作计划书(拼多多).docx VIP
- L13S8 排水工程标准图集.pdf VIP
- GBTT 8706-2006 钢丝绳 术语丶标记和分类.docx VIP
- 跨境电商选品与市场调研培训课件.pptx VIP
- DB44T 2757—2025 五指毛桃林下栽培技术规程.pdf VIP
- 企业知识型员工工作幸福感对离职倾向的深度解析与应对策略.docx VIP
原创力文档

文档评论(0)