NI Zhang1, FAN Xin2, PAN Mao-hui3, et al. Design of electric vehicle light control system based on CAN-bus[J]. 2011, 30(12): 82-84. DOI: 10.13873/j.1000-97872011.12.014.
基于CAN总线的电动汽车车灯控制系统设计
摘要
设计选用单片机STC12C5A60S2及其接口单元电路
利用电动汽车车灯开关产生输入信号
单片机根据开关的闭合状态形成报文
利用CAN模块通过CAN总线发送。车灯控制模块中单片机控制CAN模块接收报文
并根据报文信息控制相应车灯工作。介绍了该系统的组成和整体方案、主要元器件的选型
重点介绍了硬件连接方案
并提出优化设计。软件采用模块化设计
分初始化模块、发送模块、接收模块3个模块进行。通过软硬件联合调试
实现了按键开关输入控制相应灯泡的亮灭的功能
实验表明:该系统结构简单、性能可靠
具有广阔的应用前景。
Abstract
The design uses a microcontroller STC12C5A60S2 and interface unit circuitry.The car lights switch generates the input signal
the microcontroller sends CAN messages according to the switch status through the CAN bus module.Light control module chip receives the control packets via CAN module and controls the corresponding lights to work according to packets of information.The system components and the overall program
the selection of main components are described
focusing on the hardware connection scheme
and the optimal design is proposed.Software is designed in module
divided into three modules
the initialization module
sending module
receiving module.Through the joint modulation of hardware and software
the key switch input control the corresponding light bulb off is achieved.Tests show that the system is simple