POP DPL POP DPH POP PSW POP A
29
唐 山 学 院 毕 业 设 计
CLR P3.4
RETI ; 中断返回;
T0: PUSH A ; 定时器0定时中断服务程序 PUSH DPH PUSH DPL PUSH PSW INC 50H
INC 70H ; 100MS单元累加1 MOV A,70H
CJNE A,#0AH,LL ; 时间达1秒? MOV 70H,#00 INC 51H
INC 71H ; 时间达1秒,则秒单元累加1 MOV A,71H
CJNE A,#3CH,LL ; 时间达1分? MOV 71H,#00H INC 52H
INC 72H ; 时间达1分,则分单元累加1 LL: POP PSW POP DPL POP DPH POP A
RETI ; 中断返回 ;
INT1: PUSH A ; 以下为开盖、不平衡中断服务程序 PUSH PSW PUSH DPH PUSH DPL
SETB P3.5 ; 撤消本次中断请求信号 CLR P1.1 ; 停止排水操作 CLR P1.2 ; 停止脱水操作
30
唐 山 学 院 毕 业 设 计
CLR ET0 ; 关定时器0定时中断
JP0: JNB P1.6,$ ; 等待开盖或不平衡中断信号消失 SETB P1.1 ; 恢复排水操作 SETB P1.2 ; 恢复脱水操作 POP DPL POP DPH POP PSW POP A CLR P3.5
SETB ET0 ; 定时器0中断允许 RETI ; 中断返回;
K1: ACALL DEL10 ; 以下为强弱选择键处理程序 JNB P1.4,X4 AJMP EXIT1 X4: ACALL FZH MOV A,54H CJNE A,#40,J1 CLR P1.7 MOV 54H,#30 MOV 55H,#20 AJMP EXIT1 J1: SETB P1.7 MOV 54H,#40 MOV 55H,#10
EXIT1: JNB P1.4,EXIT1 RET ;
K2: ACALL DEL10 ; 以下为洗衣工作程序选择键处理程崐序 JNB P1.5,X5 AJMP X9 X5: ACALL FZH
31
唐 山 学 院 毕 业 设 计
MOV A,57H CJNE A,#00,X6
SETB P3.0 ; 标准洗衣工作程序赋值 SETB P3.1 MOV 57H,#03 MOV 56H,#0F0H AJMP X9
X6: CJNE A,#03,X7
SETB P3.0 ; 经济洗衣工作程序赋值 CLR P3.1 MOV 57H,#02 MOV 56H,#0F0H AJMP X9
X7: CJNE A,#02,X8
CLR P3.0 ; 单独洗衣工作程序赋值 SETB P3.1 MOV 57H,#01 MOV 56H,#00 AJMP X9
X8: CJNE A,#01,X9
CLR P3.0 ; 排水洗衣工作程序赋值 CLR P3.1 MOV 57H,#00 MOV 56H,#00
X9: JNB P1.5,X9 ; 等待该键释放 RET ;
FZH: SETB P3.7 ; 发声子程序 ACALL DEL10 CLR P3.7 RET ;
32
唐 山 学 院 毕 业 设 计
DEL10: MOV R6,#0AH ; 10MS延时子程序 D1MS: MOV R7,#64H DLL: NOP NOP NOP
DJNZ R7,DLL DJNZ R6,D1MS RET END
33
唐 山 学 院 毕 业 设 计
外文资料
1英文资料
Widely used in commercial single-chip microcomputer, such as modems, motor control systems, air-conditioning control systems, automotive engines and other areas. These single-chip high-speed processing and enhanced collection of peripheral devices makes them suitable for high-speed events in a variety of applications. However, the key application areas of these single-chip also requires a high degree of reliability. Robust test environment for verification of these components in terms of the level of the single-chip or system-level tool for the appropriate environment to ensure high reliability and low market risk. Intel has developed a platform for the engineering department for an object-oriented verification of its single-chip multi-linear AT89C2051 car test environment. This environment is not only a vehicle for the AT89C2051 single-chip test environment to provide a robust and easy to develop an extended and repeated to verify the future of several other single-chip microcomputer. The development of such an environment are connected to the AT89C2051. This article discusses the design of such a test environment and the principles of the various hardware and software components of the interactive environment, as well as how to use the AT89C2051. 1 Introduction
8-bit single-chip AT89C2051 CHMOS process was designed to handle high-speed calculations and fast input / output. MCS-51 single-chip application of typical high-speed event control system. Commercial applications include modems, motor control systems, printers, photocopying machines, air-conditioning control systems, disk drives and medical equipment. The automobile industry to MCS-51 single chip for the engine control system, suspension system and braking system locked. AT89C2051 particularly benefit from it very well apply to the processing speed and enhanced peripheral functions on-chip set, such as automotive power control, vehicle dynamic suspension, locked braking and stability control applications. As a result of these decisive applications, the market needs a reliable response to the potential interference with a low cost - effectiveness of the controller and service a lot of time and event-driven real-time applications in the outskirts of the need for an integrated capability in a single package to deal with higher than average power The central processing unit. Have the equipment to operate the unpredictability of the economic and legal risk is very high. Once entering the market, especially in tasks such as defining application locked autopilot or braking
34
唐 山 学 院 毕 业 设 计
systems, the error would be prohibited financially. The cost of redesign can be as high as USD 500K.
35
唐 山 学 院 毕 业 设 计
2中文翻译
单片机广泛应用于商业,诸如调制解调器、电动机控制系统、空调控制系统、汽车发动机和其他一些领域。这些单片机的高速处理速度和增强型外围设备集合使得它们适合于各种高速事件应用场合。然而,这些关键应用领域也要求这些单片机高度可靠。健壮的测试环境和用于验证这些无论在元部件层次还是系统级别的单片机的合适的工具环境保证了高可靠性和低市场风险。Intel 平台工程部门开发了一种面向对象的用于验证它的AT89C2051汽车单片机多线性测试环境。这种环境的目标不仅是为AT89C2051汽车单片机提供一种健壮测试环境,而且开发一种能够容易扩展并重复用来验证其他几种将来的单片机。开发的这种环境连接了AT89C2051。本文讨论了这种测试环境的设计和原理,它的各种硬件、软件环境部件的交互性,以及如何使用AT89C2051。
1 介绍
8位AT89C2051 CHMOS工艺单片机被设计用于处理高速计算和快速输入/输出。MCS-51单片机典型的应用是高速事件控制系统。商业应用包括调制解调器、电动机控制系统、打印机、影印机、空调控制系统、磁盘驱动器和医疗设备。汽车工业把MCS-51单片机用于发动机控制系统、悬挂系统及反锁制动系统。AT89C2051尤其很好适用于得益于它的处理速度和增强型片上外围功能集,诸如汽车动力控制、车辆动态悬挂、反锁制动及稳定性控制应用。由于这些决定性应用,市场需要一种可靠的具有低干扰潜伏响应的费用-效能控制器,服务大量时间和事件驱动的在实时应用需要的集成外围的能力,具有在单一程序包中高出平均处理功率的中央处理器。拥有操作不可预测的设备的经济和法律风险是很高的。一旦进入市场,尤其任务决定性应用诸如自动驾驶仪或反锁制动系统,错误将是财力上所禁止的。重新设计的费用可以高达500K美元。
36