文档介绍:本科学生毕业设计
基于单片机的ICAN-RS232
协议转换器设计
系部名称: 电子工程系
专业班级:测控技术与仪器
学生姓名:
指导教师:
职 称:
黑龙江工程学院
二OO九年六月
The Graduation Design for Bachelors Degree
Design of iCAN-RS232 Protocol
Converter Based on Microcontroller Unit
Candidate: Zhan Damin
Specialty: Measurment & Control Technology and
Instrumentations
Class:
Supervisor:
Heilongjiang Institute of Technology
2009-06 • Harbin
RS-232是通用的工业标准,它的应用无处不在,CAN是现场总线中的优秀代表, 在汽车制造、航空工业等自动化控制领域应用广泛,iCAN协议是基于CAN-bus的应用 层协议,并详细地定义了CAN报文中ID以及数据的分配和应用,iCAN协议已被广泛应 用,一些厂商已制造了一些iCAN系列的功能模块。冃前,使用的大部分通信设备都具 备RS232接口,而没有CAN接口,为了能与CAN总线之间进行通讯,设计了一种基于 单片机的1CAN-RS232协议转换器。通过该协议转换器,带有RS232接口的设备可与 CAN总线之间进行通信。
本设计首先简要介绍了 RS232和CAN,并指出设计基于单片机的1CAN-RS232 协议转换器的必要性和可行性;其次,对RS232和iCAN协议的介绍,这是设计 1CAN-RS232协议转换器的基础;再次,iCAN・RS232协议转换器硬件电路的设计,采 用AT89S51为主控制器进行数据的处理,利用MAX232进行TTL-RS232电平转换, 以SJAIOOO为CAN总线控制器、PCA82C250为CAN总线收发器共同完成CAN总线 的数据收发,这一部分的成果是1CAN-RS232协议转换器的硬件实体;最后在硬件基 础上,设计通信程序,实现协议转换。
关键词:CAN; RS232; iCAN;协议转换;AT89S51 ; SJAIOOO; PCA82C250
ABSTRACT
The industrial standard RS-232 is universal, and it's used everywhere. CAN is outstanding representatives of field bus in automotive, aerospace, industrial automation control field. The iCAN protocol is based on CAN-bus the application-layer protocol, and detailedly defines CAN in the message of ID and data distribution and application. The iCAN protocol has been extensively applied. Some manufacturers have made some iCAN series of function module. At present, most of the telecommunication equipments are used with RS232 interface, without CAN interface. In order to communicate with CAN-bus, design a kind of iCAN-RS232 protocol converters based on Microcontroller Unit. Through this protocol converters, with RS232 interface device communicates with CAN bus.
This design briefly introduces firstly RS232 and CAN, and points out that design of iCAN・ RS232 protocol converters based on Microcontroller Unit of necessity and feasibility. Secondly, the protocol that introduces RS232 and