1. Chapter 10 Design and Development of Microcontroller Application System, 10.1 Development Process of Microcontroller Application System 10.2 Application System Development Tools 10.3 Examples of Microcontroller Application System 10.4 Anti-interference technology of Microcontroller Application System, Exit, 10.1 Development Process of Microcontroller Application System, 10.1.1 Drafting the overall design plan 1. Drafting the design task book 2. Establishing a mathematical model 3. Selection of models设备4。硬件和软件功能部,10.2.2应用程序系统开发工具,10.2.1微控制器开发系统的组成,10.2.2微控制器开发系统的功能,微控制器开发系统应具有输入,编辑,组装,组装,组装和调试用户程序的功能。此外,必须提供在线仿真功能。辅助设计功能是测量微控制器开发系统性能的重要指标。 1。程序输入和编辑2。输入用户程序
2. Line assembly, connection and loading 3. Debugging the user program (1) Set breakpoint operation (2) Single-step operation (3) Continuous operation (4) Read and modify the target system status, 4. Disassembly function 5. Tracking function 6. Programming function 7. Program design language of microcontroller development system 11.2.3 Introduction to microcontroller developers There are currently many varieties of domestic general-purpose microcontroller developers.例如:SICE系列(由Fudan University开发),DVCC系列(由Qidong Computer Factory制造),KDV系列(由中国科学与技术大学开发),MICE(由Zhuhai Wanli Electronics Co.,Ltd.制造),WEIFU E2000教育工具有限公司)。 (由特定开发人员介绍),10.3 MicroController应用程序系统就是一个例子,以交叉路口流量控制系统为例,介绍了微控制器应用程序系统的设计。
3。方法。 10.3.1总体设计计划1。任务簿系统功能:此交叉路口交通灯控制系统被分为东西方和南北的道路,作为道路作为道路的道路A和南北道路,道路为B.法规:泳道A的释放时间为2分钟,而Lane B为1.5分钟;绿灯被释放,红灯停止。当绿灯变成红色时,黄色的光线打开2秒。当一辆汽车在那里,但另一辆车没有汽车时,交通灯控制系统可以立即释放车道。如果需要紧急车辆通过,则该系统应能够禁止普通车辆并允许紧急车辆通过。 ,处理解决方案:该系统使用微控制器作为中央处理组件,并且输入/输出量都是开关数量,而应急车辆通过,采用了实时中断方法。 2。选择模型和设备的系统使用常用的8031微控制器作为中央处理组件,2732a作为程序内存,以及4个红色,绿色和黄色的光线用作交通指示器,反映了A和通道A中是否有车辆。
4。每个传感器是2,并且处理了一个打断的紧急车辆按钮。 ,10.3.2硬件设计连接了通道A上的两个相同颜色的灯,并且B频道B上的同一颜色灯也相互连接(此处使用发射二极管来模拟实际的交通信号灯);使用8031微控制器的P1.0P1.5来控制各种交通信号灯的照明和熄灭;是否有A和B频道上的车辆,将其输入P1.6和P1.7;如果紧急车辆通过,则使用外部扳机按钮来中断实时。根据系统的功能要求和所使用的组件,设计了硬件电路,并且电路原理如图10-8所示。 ,10.3.3软件设计根据硬件电路示意图和系统功能绘制程序流程图。由于该系统相对简单,因此使用自上而下的设计方法来执行编程。如果紧急车辆通过,则使用中断方法并处理中断处理程序。程序流
5。该过程如图10-9(a)和10-9(b)所示。注意:p1.6 = 0表示有一辆穿过车道A的汽车,p1.6 = 1表示没有汽车穿过车道A; P1.7=0 means that there is a car passing through Lane B, P1.6=1 means that there is no car passing through Lane B. ,The reference program is as follows: (1) Main program: ORG 0000HLJMP STARTORG 0003HLJMP TOINTORG 1000H START: SETB IE.0SETB IP.0CLR TCON.0,ENTER: CLR EAMOV R4, #60MOV P1, #11110011bclr f0setb ea loop1:acall delaydjnz r4,pa1ajmp ll1 pa1:mov c,p1
6. .6JNC LOOP1,LL1: MOV P1 , #11110101BACALL DELAYCLR EAMOV R5 , #45MOV P1 , #11011110BSETB F0SETB EA LOOP2: ACALL DELAYDJNZ R5 , PB1AJMP LL2,PB1: MOV C , P1.7JNC LOOP2MOV C , P1.6JC LOOP2 LL2: mov p1,#11101110bacall delayajmp输入延迟:mov r1,#14h mm1:mov r2,#0c8h,mm2:mov r3,#0fah mm3:dj
7。NZR3,MM3DJNZ R2,MM2DJNZ R1,MM1RETEND,(2)中断服务程序:TOINT:PUSH P1MOV C,F0JNC PASETB P1.5CLR P1.5CLR P1.4ACALL DELAXMOV P1 #11110110B循环:MOV C,P3.2JNC LOOPMOV C,F0MOV P1,#11110011B LB:MOV P1,#11011110BPOP P1RETI,10.4 MicroController Application Systems Systems Systems Anfi-Intierference,10.4.1硬件反干扰技术1.Anti-Intererference1。anti-Interersely 1.Anti-Intertery Technology。印刷电路板的反干扰10.4.2软件反干扰技术1。命令冗余和软件陷阱2。