CAN总线连接控制器.doc
文本预览下载声明
CAN总线连接控制器
专业:电气工程及其自动化 姓名:黄志伟 指导老师:周志文
摘 要 本论文设计了一个以CAN总线和单片机为核心的控制器。在分析了CAN总线连接控制器的功能和结构的基础上,采用AT89S52单片机为主控制器,进行了单片机最小系统的硬件设计,并进行了模拟输入前向通道、模拟输出后向通道和CAN通讯模块的设计。在介绍各个模块的具体设计的同时,对其设计的关键芯片也给予了详细的介绍。该控制器实现了8位模拟信号的并行输入和8位模拟信号的串行输出,在其与外部进行通讯时最快可以实现1Mbms的速度。软件设计部分实现了系统初始化、采集数据出错提示、数据的输出/输入、本地/远程数据的处理以及数据的远程传输。在这里给出了主程序和主要子程序的程序设计流程图。如果有特殊需要也可以根据具体的要求对软硬件进行相应的扩展或删减以便更优的应用到生产或生活中。
关键词 AT89S52,CAN总线,节点
ABSTRACT
The present paper has designed one controller which taken the CAN-bus and the monolithic integrated circuit as the core. In has analyzed the CAN-bus interfacing controllers function and in the structure foundation, using AT89S52 monolithic integrated circuit as main controller carried on the monolithic integrated circuit smallest systems hardware design, and has carried on the design of analog input forward channel, the analog output backward channel and the CAN communication module. While introducing concrete design of each module, this article has also given the detailed introduction to its designs essential chip. This controller has realized serial output of 8 simulated signal parallel input and 8 simulated signal, carries on1Mbms speed when communicate with exterior equipment. The software design partly realized system initial self-checking, the running status monitor, to make a mistake the prompt, the data output/input, local/long range data processing as well as the data long-distance transmission. Here we have the master routine and the main subroutine programming flow chart. If there has the special need also to be possible to carry on the corresponding expansion or the deletion according to the concrete request to the software and hardware, so have wide application in production or life.
Key Words:AT89S52, CAN-bus, Node
1.绪论
集先进的嵌入式系统、现代通讯、自控理论和网络技术于一身的现场总线技术,是自动化技术发展的热点之一。它的出现标志着工业控制技术领域进入了一个新的时代。
CAN总线作为符合国际标准的现场总线之一,已经在世界范围内得到了广泛的应用。由于在国内CAN总线的发展起步较晚,虽然最近几年有了较大的发展,但是现在仍然有很多的控制系统的设计是基于RS485总线。
基于RS485的总线系统的主从结构,无法构成多主或冗余结构的系统;通信方式采用循环地址
显示全部