- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
频率计源程序(Frequency meter source program)
频率计源程序(Frequency meter source program)
beep piece p3.7
lcd _ rs piece p2.0
lcd _ rw bit p2.1
lcd _ a piece p2.2
lcd _ x equ 3fh; lcd 地址变量
timer _ h equ 30h; 定时器高位字节单元
timer _ l equ 31h; 定时器低位字节单元
timcount equ 32h; 时间中断数
int _ g equ 35h; 中断计数缓冲单元高地址
int _ h equ 34h; 中断计数缓冲单元中地址
int _ l equ 33h; 中断计数缓冲单元低地址
t _ s equ 36h; 数据显示低位
t _ m equ 37h; 数据显示中位
t h _ equ 38h; 数据显示高位
t _ g equ 39h; 数据显示最高位
----------------------------------------------------------;
0000h org
jmp main; 主程序开始
000bh org
jmp timer _ int; 定时器t0中断服务程序
org 001bh; 定时器t1中断服务程序
jmp timer1
0030h org
----------------------------------------------------------;
main:
mov sp, # 60h; 设置sp指针
lcall pro _ set; 初始化
call the set _ lcd
lcall tim _ t0
-----------------------------------------------------------;
; lcd1602是慢速显示器件, 故100ms显示一次.
-----------------------------------------------------------;
main1:
mov r5,40
main2:
acall delay1; 3ms
djnz r5, main2
acall sbin _ sbcd
call conv
jmp main1
------------------------------------------------------------;
t1计数器中断服务子程序;
计t1计数器溢出次数;
------------------------------------------------------------;
timer1:
2ah inc.
reti
------------------------------------------------------------;
初始化程序;
------------------------------------------------------------;
the _ set: mov (a, # 00h
mov b, # 00h
mov 2ah, (a)
mov p0, # 0ffh
mov p1, # 0ffh
mov p2, # 0ffh
mov int _ h, # 00h
mov int _ l, # 00h
mov int _ g, # 00h
mov t _ s, # 00h
mov t _ h, # 00h
mov t _ m, # 00h
mov t _ g, # 00h
mov timcount, # 00h
mov timer _ h, # 04ch; 定时 50 ms.
mov timer _ l, # 10h;
clr beep
setb p3.5; p3.5端口置输入状态
ret; t1 (timer1的外部输入脚)
-----------------------------------------------------;
初始化设置; lcd
-----------------------------------------------------;
the set _ lcd:
clr lcd _ a
call init _ lcd; lcd 初始化
call delay1
mov dptr, # info1; 指针指到显示信息1
mov (a, # 1; 显示在第一行
call lcd _ show
mov dptr, # info2; 指针指到显示信息2
mov (a, # 2; 显示在第二行
call lcd _ show
ret
;
-----------------------------------------------------
信息:DB“计”,0;液晶第一行
您可能关注的文档
- 西方企业一般培训理论综述(A review of general training theories in Western firms).doc
- 西方经济学 高鸿业主编 第12章 课后习题答案(Western economics, Gao Hongye, editor, Twelfth chapters, after-school Exercises answer).doc
- 西方经济学(金融)电大 实训 1.8 习题(Western Economics (Finance) RTVU practice 1.8 exercises).doc
- 西游记人物的名字.(The names of people traveling to the West).doc
- 西班牙斗牛(Spanish bullfight).doc
- 西交电气小专业课程介绍(Introduction of the course of electric small specialty).doc
- 西贝乐果蔬料理美食谱(XiBeiLe cuisine delicacy spectrum of fruits and vegetables).doc
- 西部人才流失的成因及其治理(Causes and governance of brain drain in West China).doc
- 西部大开发(Western Development).doc
- 西门子家电在中国的品牌建设及其启示(Brand building of SIEMENS appliance in China and Its Enlightenment).doc
- 颠覆,就在奥运前夜(Subversion, just before the Olympic Games).doc
- 风投热议互联网快鱼吃慢鱼(VCs hot Internet quick fish).doc
- 项目教学法应用中的体会与建议(Experience and suggestion in application of project teaching method).doc
- 风控及调查纲要(Risk control and investigation outline).doc
- 飞卢中文网原创文学作品独家授权协议(Exclusive license agreement for original literary works).doc
- 领导上任卸任讲话稿(Leadership outgoing speech).doc
- 飞机大体特征(General features of aircraft).doc
- 飞鹤(Flying crane).doc
- 领导学名词解释(Interpretation of leadership terminology).doc
- 风险论述(Risk discourse).doc
文档评论(0)