首先研究CAN總線和SAE J1939協議,提出一種基于MC9S12HZ256微控制器的總線式汽車數字儀表解決方案。詳細介紹SAE J1939協議的報文幀格式及應用層協議中發動機相關參數的定義,以及步進電機及其驅動和車速信號的處理方法。該數字儀表系統硬件平臺由微處理器和信號采集和信息處理及顯示等模塊組成。軟件設計部分編程實現了對CAN總線和各傳感器數據的讀取、處理。該系統能夠實時反映車輛工況。
Abstract:
In this paper,CAN bus and SAE J1939protocol are researched,and a vehicle digital instrument solution based on MC9S12HZ256MCU is proposed.The message frame format and some engine-related parameters’definition in SAE J1939application layer protocol are introduced in detail.Stepper motor and its driver,the methods of speed signal process-ing are also introduced.The hardware platform of vehicle digital instrument is composed by MCU,signal acquisition mod-ule,and signal processing and displaying module.Data receiving and processing from CAN bus and sensors are accom-plished by programming,and vehicle condition can be reflected in real-time.
針對材料試驗機等設備中要求測量或控制材料拉伸或壓縮的位移,一般采用光電軸角編碼器檢測位置信號,輸出正交編碼脈沖信號。若采用其他方法檢測位置信號,必然導致電路設計復雜,可靠性降低。因此,提出一種基于LS7266R1的電子式萬能材料試驗機設計方案。給出了試驗機中的控制器工作原理,LS7266R1與單片機的接口硬件設計,以及主程序軟件流程圖。巧妙地把力量傳感器,位移傳感器等機械運動狀態的壓力或拉力以及位置坐標,變成了電壓信號和電脈沖數字信號,供A/D測量和LS7266R1計數,從而實現了獨立完成材料試驗控制或通過PC機串口命令完成材料試驗控制。
Abstract:
Aiming at the requirement that the displacement of the tension and compression always be tested and controlled in the equipement such as material testing machine. The position signal was tested by photoelectric axial angle coder. Therefore, the paper proposes the design of electronic universal testing machine design based on LS7266R1. If the position signal detected by other methods, will inevitably lead to the circuit design complexity, reliability decreased. The work theory of the controller, the hardware interface design between LS7266R1 and single chip, and the flow chart of main program, are presented in this paper. The signal of the compression or tension power and displacement at working, which tested by power sensor and displacement sensor especially, is changed into electric voltage and electric pulse numerical signals. And these signals can be tested by A/D and counted by LS7266R1. Finally the test of the material properties can be controlled by itself, or controlled by the COM command of PC.