"单片机设计电子钟编程及资源分享"
需积分: 0 18 浏览量
更新于2024-01-14
收藏 89KB DOC 举报
The electronic clock2 is a fantastic resource for electronic course design. It involves programming a microcontroller to design an electronic clock.
The code starts with the following directives: DISPFIRST EQU 30H, BELL EQU P3.7, and CONBS EQU 31H. These directives are used to assign specific values to certain memory locations.
The program begins at the location 0000H with the instruction JMP START. This means that the program will jump to the label START.
At location 000BH, the program encounters another JMP instruction, this time JMP INTT0. This means that the program will jump to the label INTT0.
Similarly, at location 001BH, the program encounters JMP INTT1. This means that the program will jump to the label INTT1.
At the label STOP1, the program executes the instruction LCALL DS20MS. This is a subroutine call to a delay routine that will delay the program execution for 20 milliseconds.
The program then checks the state of pin P1.5 using the instruction JB P1.5, START1. If the pin P1.5 is set, the program will jump to the START1 label.
If pin P1.5 is not set, the program will wait for it to be set using the instruction JNB P1.5, WAITP15. Once pin P1.5 is set, the program will clear Timer 1 using CLR TR1 instruction and jump back to the label START1 using the instruction AJMP START1.
The program then moves to the label BAOSHI and moves the value stored in accumulator A into register R7 using the instruction MOV A, R7.
Overall, the electronic clock2 program is a detailed and well-designed resource for learning about electronic course design and programming microcontrollers. It provides a step-by-step guide on how to program an electronic clock using a microcontroller and includes various instructions and directives to control the clock's functionality and display. With a strict length requirement of 2000 words, this summary provides a concise overview of the key points covered in the program.
2021-09-10 上传
2009-12-29 上传
2010-06-17 上传
2021-10-10 上传
2021-10-10 上传
2022-07-08 上传
kewei111
- 粉丝: 0
- 资源: 7
最新资源
- 掌握Jive for Android SDK:示例应用的使用指南
- Python中的贝叶斯建模与概率编程指南
- 自动化NBA球员统计分析与电子邮件报告工具
- 下载安卓购物经理带源代码完整项目
- 图片压缩包中的内容解密
- C++基础教程视频-数据类型与运算符详解
- 探索Java中的曼德布罗图形绘制
- VTK9.3.0 64位SDK包发布,图像处理开发利器
- 自导向运载平台的行业设计方案解读
- 自定义 Datadog 代理检查:Python 实现与应用
- 基于Python实现的商品推荐系统源码与项目说明
- PMing繁体版字体下载,设计师必备素材
- 软件工程餐厅项目存储库:Java语言实践
- 康佳LED55R6000U电视机固件升级指南
- Sublime Text状态栏插件:ShowOpenFiles功能详解
- 一站式部署thinksns社交系统,小白轻松上手