- 13
- 0
- 约 22页
- 2017-10-07 发布于河南
- 举报
时钟芯片pcf8563可用程序(Clock chip PCF8563 available program)
时钟芯片pcf8563可用程序(Clock chip PCF8563 available program)
Clock chip PCF8563 assembly language program
07/1/27
Clock chip 8563
Read from 8563, minutes, seconds, data, digital display
SCL_8563 BIT P1.6; clock line of clock chip
SDA_8563 BIT P1.7; clock chip data line
SCL BIT P0.3; 164 clock line
SDA BIT P0.2; 164 data lines
LED0 EQU 40H; saves seconds bit data
LED1 EQU 41H; saves ten bits of data per second
LED2 EQU 42H; saves bits of data
LED3 EQU 43H; saves ten bits of data
LED4 EQU 44H; save bit data
LED5 EQU 45H; saves ten bits of data per second
TDATE EQU 46H; time cache
S EQU 47H
MIN EQU 48H
HOU EQU 49H
SUBA EQU 4AH
ORG 0000H
AJMP MAIN
ORG 0100H
The main program at ***********;
MAIN:
ACALL SEND8563; write the clock, the initial initialization of the clock is 12 points, 0 minutes and 0 seconds
LOOP:
ACALL RCV8563; read clock data
ACALL SEP; data split
ACALL DISPLAY; call display
ACALL DELAY; call delay
AJMP LOOP
At the end of the main program ***********;
**********; initialization time is written into the 8563 ************** subroutine
SEND8563:
MOV, S, #00H; initialization time
MOV, MIN, #00H
MOV, HOU, #12H
MOV SUBA, #02H; the countdown time byte address
MOV, TDATE, S, seconds data
ACALL WRITE_8563; read data 8563
MOV, SUBA, #03H; read the read time byte address
MOV, TDATE, MIN
ACALL WRITE_8563
MOV, SUBA, #04H; time byte address for reading
MOV, TDATE, HOU
ACALL WRITE_8563
RET
**********; initialization time is written into the 8563 end of subroutine **************
**********; write subroutine which 8563
WRITE_8563:
ACALL START; send IC bus start condition to start PC8563
MOV, A, #0A2H; take the device address and write instructions to the 8563
ACALL WRITE_BYTE; writes to the PCF8563 device bus address
MOV, A, SUBA; read time byte address
ACALL WRITE_BYTE; writes to the time byte address
MOV, A, TDATE; writes the data to be written
ACALL WRITE_BYTE; write in time
ACALL STOP; send IC bus stop condition
RET
**********; write 8563 *********** end subroutine
A result
您可能关注的文档
- 摩托车知识总结(Motorcycle knowledge summary).doc
- 播出渠道(Broadcast channel).doc
- 播音主持基础(Broadcasting and hosting Foundation).doc
- 播音主持自我介绍(Broadcast, introduce yourself).doc
- 播音主持专业指定稿件朗读的注意事项(Notes on the reading of professional designated manuscripts).doc
- 撰写科技论文的五个要素(Five elements of writing scientific papers).doc
- 操作系统教学计划(v08.02)(Operating system teaching plan (v08.02)).doc
- 操作系统概论(Introduction to operating systems).doc
- 攀枝花美食宝典(Panzhihua gourmet collection).doc
- 支付宝首席产品设计师白鸦离职感恩支付宝(Alipay's chief designer white crow turnover Thanksgiving Alipay).doc
最近下载
- 浙江省台风年鉴(原始资料).doc VIP
- 《光电图像处理》第五章图像变换及应用.ppt VIP
- 新源县肖尔布拉克镇C波段双偏振天气雷达建设项目环评(新版环评)环境影响报告表.pdf
- 2025年贵州高考物理含解析及答案.docx VIP
- 2025年高考英语一轮复习精品讲义—必修第二册:Unit 2 Let’s celebrate(外研版).pdf VIP
- XR360旋挖钻机技术规格书(修订).docx
- 2025年高考英语一轮复习精品讲义—必修第二册:Unit 3 On the move(外研版).pdf VIP
- 宿迁市2026届高三(一模)英语试卷(含答案).docx
- 2026年10篇稿:领导班子“五个带头”方面在带头强化政治忠诚、提高政治能力等对照检查材料【供参考】.docx VIP
- 2023年青岛城市学院数据科学与大数据技术专业《数据结构与算法》科目期末试卷A(有答案).docx VIP
原创力文档

文档评论(0)