【正文】
lexibility, pared with the general munication bus. Ether Inter constructed as one of the most popular LAN technology, has not only high efficiency and good stability characteristics of the transmission data, but also the interconnection work for remote access. But it can not be directly connected to industrial equipment to municate. Connectting the scope of application of two different work in order to exploit their advantages to achieve industrial production monitoring and management, we need to realize through the gateway. In this paper, indepth study of the agreement and implementation of the principle characteristics of TCP/IP protocol, it has made an Ether and CAN bus interconnection gateway model. With the hardware platform of SBC6845ARM development board (equipped with the AT91SAM9G45 ARM9 processor kernel) and and the software platform of embedded Linux, using GEDIT tools for software design, using four threads to process store and forward data uplink and downlink data, converting CAN bus protocol and TCP / IP protocol, it achieves the interconnection of Ether and CAN bus. Thus, we can visit the field equipment, monitor and manage it in the control room. The test results show that the design of the system achieves design function. Keywords: Linux, CAN BUS, Ether, Gateway III 目 錄 第 1 章 緒論 ...................................................................................................................... 1 課題研究的背景及意義 .......................................................................................... 1 CAN 總線和以太網(wǎng)技術(shù)的研究現(xiàn)狀 ..................................................................... 1 CAN 總線的研究現(xiàn)狀 ................................................................................... 1 以太網(wǎng)的研究現(xiàn)狀 ........................................................................................ 2 本文的主要工作 .................................................................................................. 2 第 2 章 CAN 總線和以太網(wǎng)簡(jiǎn)介 .................................................................................... 3 CAN 總線簡(jiǎn)介 ......................................................................................................... 3 以太網(wǎng)簡(jiǎn)介 ............................................................................................................. 8 第 3 章 系統(tǒng)硬件設(shè)計(jì) ...................................................................................................... 9 硬件總體方案設(shè)計(jì) ................................................................................................. 9 硬件電路設(shè)計(jì) ....................................................................................................... 11 核心處理器 ................................................................................................. 11 CAN 總線電路 ............................................................................................. 12 以太網(wǎng)電路 ................................................................................................. 13 第 4 章 系統(tǒng)軟件設(shè)計(jì) .................................................................................................... 16 嵌入式系統(tǒng)特點(diǎn)及開發(fā)流程 ............................................................................... 16 CAN 總線模塊軟件設(shè)計(jì) ....................................................................................... 17 以太網(wǎng)模塊軟件設(shè)計(jì) ........................................................................................... 17 TCP 客戶端建立連接 .................................................................................. 18 以太網(wǎng)發(fā)送和接收數(shù)據(jù) ............................................................................. 18 網(wǎng)關(guān)應(yīng)用程序設(shè)計(jì) ............................................................................................... 18 雙循環(huán)緩沖機(jī)制 ......................................................................................... 19 網(wǎng)關(guān)多線程設(shè)計(jì) ......................................................................................... 20 網(wǎng)關(guān)協(xié)議轉(zhuǎn)換程序設(shè)計(jì) ............................................................................. 21 第 5 章 系統(tǒng)測(cè)試 ............................................................................................................ 24 網(wǎng)口連接測(cè)試 ........................................................................................................ 24 網(wǎng)關(guān)工作狀態(tài)測(cè)試 ................................................................................................ 24 IV 第 6 章 結(jié)論及展望 ........................................................................................................ 28 參考文獻(xiàn) ............................................................................................................................. 29 致 謝 ............................................................................................................................. 30 基于 ARM 的以太網(wǎng)網(wǎng)關(guān) 設(shè)計(jì)與實(shí)現(xiàn) 1 基于 ARM 的以太網(wǎng)網(wǎng)關(guān) 設(shè)計(jì)與實(shí)現(xiàn) 第 1章 緒論 課題研究的背景及意義 現(xiàn)場(chǎng)總線是應(yīng)用在生產(chǎn)現(xiàn)場(chǎng)、在微機(jī)化測(cè)量控制設(shè)備之間實(shí)現(xiàn)雙向串行多節(jié)點(diǎn)數(shù)字通信的系統(tǒng),也被稱為開放式、數(shù) 字化、多點(diǎn)通信的底層控制網(wǎng)絡(luò)。因此,使用以太網(wǎng)作為工業(yè)控制的上層網(wǎng)絡(luò)有著十分明顯的優(yōu)勢(shì)。 現(xiàn)場(chǎng)總線的當(dāng)前發(fā)展?fàn)顩r:多種總線共存、總線的應(yīng)用領(lǐng)域不斷拓展、各種總線以企業(yè)為支撐、各種總線相繼成為自己國(guó)家或地區(qū)標(biāo)準(zhǔn)、以太網(wǎng)成為新的熱