【正文】
基于單片機的 TCP/IP 技術(shù)研究及應(yīng)用摘 要今天,嵌入式 Inter 的應(yīng)用己經(jīng)深入到日常生活的各個方面。研究嵌入式 TCP/IP 協(xié)議在內(nèi)部資源有限微處理器上的實現(xiàn),具有重要的現(xiàn)實意義和經(jīng)濟價值。論文首先介紹了嵌入式系統(tǒng)的組成及對嵌入式 Inter 產(chǎn)生。通過對現(xiàn)有的嵌入 Inter 及比較了目前幾種單片機接入 Inter 實現(xiàn)方案的前提下,應(yīng)用了一種基于單片自身特點的具體的解決方案:嵌入式 TCP/IP 協(xié)議。通過對TCP/IP 網(wǎng)絡(luò)協(xié)議的深入分析,對 TCP/IP 協(xié)議進行合理的簡化,將其嵌入到內(nèi)部資源有限的微處理器中,實現(xiàn)以電子郵件方式進行遠程數(shù)據(jù)傳輸。關(guān)鍵字:嵌入式;TCP/IP;單片機ABSTRACT Today, embedded Inter application already deeply into all aspects of daily life. Research embedded TCP/IP protocol internal resources are limited in the realization of the microprocessor, have important practical significance and economic value. It firstly introduces the embedded system position and for embedded Inter generation. Based on the existing embedded Inter and pared several recent microcontroller access Inter, under the precondition of realizing scheme used a based on single chip the characteristics of its own specific solution: embedded TCP/IP protocol. Based on TCP/IP work protocol, the indepth analysis of TCP/IP protocol, reasonable simplified embedded in its limited resources to the interior, so as to realize microprocessor by Email remote data transmission. Key words:摘 要 ........................................................................................................................................................IIABSTRACT ...........................................................................................................................................III第 1 章 引 言 ............................................................................................................................................3 論文選題的背景及意義 .................................................................................................................3 本文主要工作 .................................................................................................................................3第 2 章 嵌入式 INTERNET 系統(tǒng)組成 ...................................................................................................5 嵌入式系統(tǒng)概述 .............................................................................................................................5 嵌入式系統(tǒng)的概念機特點 .....................................................................................................5 嵌入式系統(tǒng)的組成 .................................................................................................................5 嵌入式操作系統(tǒng) ......................................................................................................................6 嵌入式 INTERNET............................................................................................................................7 嵌入式 Inter 概念及特點 ..................................................................................................7 單片機接入 Inter 方案 ......................................................................................................8第 3 章 網(wǎng)絡(luò)協(xié)議 ..................................................................................................................................10 TCP/IP 分層模型 ...........................................................................................................................10 數(shù)據(jù)封裝 .......................................................................................................................................11 數(shù)據(jù)幀分用 ...................................................................................................................................12 協(xié)議層簡介 ...................................................................................................................................13 網(wǎng)際層協(xié)議 ...........................................................................................................................13 IP 地址分配 .....................................................................................................................................14 地址解析協(xié)議 .................................................................................................................................15 ICMP 協(xié)議 .......................................................................................................................................16 傳輸控制協(xié)議 .......................................................................................................................16 TCP 連接和釋放 ..............................................................................................................................16 用戶數(shù)據(jù)報協(xié)議 .............................................................................................................................18第四章 系統(tǒng)總體設(shè)計 ......................................................................................................................19 硬件設(shè)計 .......................................................................................................................................19 TCP/IP 協(xié)議層選擇及分析 ...........................................................................................................20 鏈路層協(xié)議選擇及分析 .......................................................................................................21 網(wǎng)絡(luò)層協(xié)議選擇及分析 .......................................................................................................21 傳輸層協(xié)議選擇及分析 .......................................................................................................21 應(yīng)用層協(xié)議選擇 ...................................................................................................................22第五章 TCP/IP 協(xié)議棧的實現(xiàn) .............................................................................................................24 ARP 協(xié)議的實現(xiàn) ...........................................................................................................................24 ARP 分組格式及數(shù)據(jù)結(jié)構(gòu) ....................................................................................................24 ARP 協(xié)議軟件實現(xiàn) .............................................................................