- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
基于51单片机的带时间显示和紧急控制的交通灯的设计(国外英语资料)
基于51单片机的带时间显示和紧急控制的交通灯的设计(国外英语资料)
Based on 51 single-chip with time display and emergency control of traffic lights design, 2007-07-06 11:27; special instructions, this procedure is for SCM enthusiasts to learn their own use,
Not for other commercial purposes
This program is tested on hardware
The crystal frequency is 11.0592MHZ
With timer 1 delay, external interrupt 0 emergency control
R0 is the 100MS delay constant, and R2 is the state delay constant
8279, control digital display time
Control the dual color light with P1 port
This program was written by 2007-7-6, author: Xu Xuejun
Z8279 EQU 0FF82H; 8279 status / command port address
D8279 EQU 0FF80H; 8279 data port address
LEDMOD EQU 00H; enter eight bit character display on the left
External key scan mode, double bond interlock
LEDFEQ, EQU, 33H, scan rate
LEDCLS EQU 0C1H; clear display RAM
LEDWR0 EQU 80H; the set of displayed RAM addresses to write to
ORG 0000H
LJMP START
ORG 0003H; INT 0 interrupts the entry address
LJMP INT_0
ORG 001BH; T1 interrupt entry address
LJMP INT_T1
ORG 0040H
START:
MOV, SP, #60H
MOV, TMOD, #10H; set T1 as mode 1
SETB EX0; INT 0 interrupts effectively
SETB IT0
SETB EA
MOV, TL1, #00H; delay 50mS constant
MOV, TH1, #4cH
MOV, R0, #2; delay 100mS constant
SETB TR1; start T1
SETB ET1
Setb pT1; must set the interrupt priority of timer 1 higher than the external interrupt 0
LCALL INIT8279; initialization 8279
LCALL STATUS0; initial status (red light)
CIRCLE:
LCALL STATUS1; North and South green lights, things, red lights
LCALL STATUS2; North and South green lights flashing yellow lights, things red lights
LCALL STATUS3; North and south red lights, things, green light
LCALL STATUS4; North and south red lights, things, green lights, flashing yellow lights
LJMP CIRCLE
INT_0:
PUSH PSW; protect the scene
推2
推90h
CLR ex0
MOV P1,# 0fh;南北,东西都亮红灯
MOV R2,# 100;延时10秒
LCALL delay_display
ex0 SETB
流行90h;恢复现场
流行2
POP PSW
RETI
int_t1:
把ACC
推PSW
CLR TR1
MOV TL1,# 00h;延时50ms常数
MOV Th1、# 4ch
SETB TR1
djnz R0,
您可能关注的文档
- 十大经典古曲 文本文档(国外英语资料).doc
- 十大道德难题(国外英语资料).doc
- 十天英语(国外英语资料).doc
- 十大难题(国外英语资料).doc
- 十招教你收获涨停(国外英语资料).doc
- 十步完成Web应用程序压力测试(国外英语资料).doc
- 千万别做数学题(国外英语资料).doc
- 千万数量级分页存储过程,可支持多表查询,任意排序(国外英语资料).doc
- 千古绝对对联100副(国外英语资料).doc
- 升华陶瓷(国外英语资料).doc
- 基于Ajax的应用程序架构设计汇总(国外英语资料).doc
- 基于ANSYS的桥式起重机主梁优化设计(国外英语资料).doc
- 基于DirectXshader的Perpixellighting实现(国外英语资料).doc
- 基于JNDI的应用程序开发(国外英语资料).doc
- 基于MasterCAM加工进刀方式的设定(国外英语资料).doc
- 基于住宅建筑节能设计的探讨(国外英语资料).doc
- 基于VC++数字图像抠像与合成系统的设计(国外英语资料).doc
- 基于射频识别技术的超市快速结账系统设计(国外英语资料).doc
- 基于字符垂直边界的车牌定位方法(国外英语资料).doc
- 基于软件无线电的扩频判决算法(国外英语资料).doc
文档评论(0)