- 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 assembler)
频率计汇编程序(Frequency meter assembler)
Cymometer program
Include: external interrupt settings, interrupt service procedures, timing procedures, timing service procedures
As well as data processing, display, including three bit decimal number into four bit BCD code,
;
------------------------------------------------------------;
BEEP BIT P3.7
LCD_RS BIT P2.0
LCD_RW BIT P2.1
LCD_EN BIT P2.2
LCD_X, EQU, 3FH; LCD address variables
TIMER_H EQU 30H; timer high byte unit
TIMER_L EQU 31H; timer low byte unit
TIMCOUNT EQU 32H; number of time interrupts
INT_G EQU 35H; interrupt count buffer unit high address
INT_H EQU 34H; address in the interrupt count buffer unit
INT_L EQU 33H; interrupt count buffer unit low address
T_S EQU 36H; data display low
T_M EQU 37H; data display median
T_H EQU 38H; data display high
T_G EQU 39H; data display MSB
----------------------------------------------------------;
ORG 0000H
JMP MAIN; the main program starts
ORG 000BH
JMP TIMER_INT; timer T0 interrupt service routine
ORG 001BH; timer T1 interrupt service routine
JMP TIMER1
ORG 0030H
----------------------------------------------------------;
MAIN:
MOV, SP, #60H; sets the SP pointer
LCALL PRO_SET; initialization
CALL SET_LCD
LCALL TIM_T0
-----------------------------------------------------------;
The LCD1602 is a slow display device, so the 100MS is displayed once.
-----------------------------------------------------------;
MAIN1:
MOV R5,40
MAIN2:
ACALL DELAY1; 3MS
DJNZ, R5, MAIN2
ACALL SBIN_SBCD
CALL CONV
JMP MAIN1
------------------------------------------------------------;
T1 Counter interrupt service subroutine
Count the T1 counter overflow times
------------------------------------------------------------;
TIMER1:
INC 2AH
RETI
------------------------------------------------------------;
Initialization program
------------------------------------------------------------;
PRO_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_
您可能关注的文档
- 西方企业一般培训理论综述(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
- 频繁跳槽白领晒职场惨相(Frequent job hopping, white-collar workplace miserable phase).doc
- 频率计源程序(Frequency meter source program).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
文档评论(0)