基于CAN总线八路开关量输入模块设计--毕业设计.docVIP

  • 5
  • 0
  • 约6.17万字
  • 约 58页
  • 2023-10-11 发布于江西
  • 举报

基于CAN总线八路开关量输入模块设计--毕业设计.doc

PAGE PAGE IV 唐 山 学 院 毕 业 设 计 设计题目:基于CAN总线八路开关量输入模块设计 机电工程系 机电工程系 06测控技术与仪器(1)班 系 别:_________________________ 06测控技术与仪器(1)班 张金普 班 级:_________________________ 张金普 王天杰姓   名:______________________ 王天杰 指 导 教 师:______________________ 2010 基于CAN总线八路开关量输入模块设计 摘 要 开关量属于数字信号的一种,现代工农业和生活商业场所需要处理大量的开关量信号,如楼宇智能安全监控,运转机械的轴温,轴振动监测,江河汛期水位的报警信号,电动机的开停等等。本文在分析了CAN总线工艺和工作原理的基础上,设计了八路开关量输入模块系统,重点介绍了CAN总线智能节点程序硬件的的设计,使模块实现设计目的性能可靠。 开关量信号由单片机P2口输入,CAN总线系统智能节点电路主要由四部分构成:微控制器89C51、独立CAN通信控制器SJA1000、 CAN总线收发器82C250和高速光电耦合器6N137。微处理器89C51负责SJA1000的初始化,通过控制SJA1000实现数据的接收和发送等通信任务。 SJA1000的AD0~AD7连接到89C51的P0口。CS连接到89C51的P1.6,P1.6为0的CPU片外存储器地址可选中SJA1000, CPU通过这些地址可对SJA1000执行相应的读写操作。SJA1000的RD、WR、ALE分别与89C51的对应引脚相连,INT接89C51的 INT0。89C51也可通过中断方式访问SJA1000。 本文所述的研究工作对CAN总线八路开关量输入模块的工作过程作了详细阐述,分析了CAN总线八路开关量输入模块工作原理,完成了系统硬件和软件的设计。其中硬件设计主要包括主要电气元件的选型、元件之间的通讯连接等。 软件设计主要包括CAN初始化程序,CAN中断程序,数据收发程序等、电气接线图的绘制以及仿真画面的实现。 关键词:CAN总线 开关量信号 微控制器AT89C51 CAN bus based eight-way digital input module design Abstract Binary digital signal is a kind of modern industry and agriculture and living places of business to deal with a large number of binary signals, such as building intelligent safety monitoring, operating machinery, axle temperature, shaft vibration monitoring, river flood water level of the alarm signal, the motor open Stop and so on. Based on the analysis of the CAN-bus technology and the working principle, the design of the eight-way digital input module system, focusing on the CAN bus intelligent node hardware design process, so that the module is designed to achieve reliable performance. Switch signal input port P2 by the MCU, CAN bus system intelligent node circuit mainly consists of four parts: micro-controller 89C51, independent CAN communication controller SJA1000, CAN bus transceiver 82C250 and high-speed optocoupler 6N137. 89C51 microprocessor is responsible for the initialization of SJA1000, SJA1000 achieved by controlling t

文档评论(0)

1亿VIP精品文档

相关文档