摘要
采用带在片CAN的微控制器PIC1 8FXX8进行CAN总线系统智能节点的硬件电路设计和软件设计。硬件电路设计时为了增强CAN总线节点抗干扰能力 ,采用MICROCHIP公司的CAN总线驱动器MCP2 5 5 1 ,并通过高速光耦 6N1 37与MCP2 5 5 1相连 ,很好地实现了总线上各CAN节点间的电气隔离 ;软件设计包括PIC1 8FXX8的CAN模块的初始化、查询方式发送子程序和查询方式接收子程序等应用中最基本的子程序。软件程序采用汇编语言编写 ,在实际应用中可采用C语言编写。
Owing to its own characteristics, CAN bus is widely used in the auto industry and now is being extended to mechanical engineering industry, NC machines, robots, household electric appliances and so on. The paper describes a design of the CAN bus system intellegent nodes with the micro-controller PIC18FXX8, including both circuit design and software design. In the circuit design, microchip CAN bus driver MCP2551 is adopted and is connected with the high-speed optical coupler 6N137 to increase the ability of anti-interference so that a good electrical isolation between nodes on the bus can be achieved. The software design involves the CAN module setup of PIC18FXX8 and some basic subprograms, such as inquiry mode sending sub-program and receiving sub-program. In order to be clear, the programs are written in assembler language while C language can be used in the practical apply.
出处
《电子工程师》
2004年第10期13-15,共3页
Electronic Engineer