在电动汽车上,以AT89C52单片机,SJA1000接口芯片以及PDISUBD12接口芯片为主要器件,完成CAN总线实时通讯系统设计。硬件设计主要完成信号采集电路和CAN-USB适配卡的电路设计工作,并采用光偶隔离、硬件滤波和斜率模式等措施,保证了系统的可靠性。软件设计主要利用C、VC++语言完成系统的软件编程,完成了CAN总线各个节点间的通信、CAN-USB适配器的固件驱动程序、PC上位机的底层驱动程序和上层应用程序的设计。最后,针对电动汽车空转运行和路面运行状态,测试CAN总线实时通讯系统可靠性。
CAN Communication System for electric vehicle was designed with MCU AT89C52,stand-alone CAN controller SJA1000 and PDIUSBD12 as the core elements.The hardware mainly completed the design of information collecting circuit and CAN-USB adapter.Many methods,such as photocoupler isolation,hardware filter,slope control mode were adoped to ensure the stability of the hardware system.Based on the hardware platform,the following softwares were designed,including the CAN node communication,the Firmware of the CAN-USB adapter,the PC host driver program and the application program,then the communication of the CAN node could be realized.Finallly,the electric vehicle was running at the state of no-load and in the road to test the sysetem relability.