cdc類虛擬串口固件設(shè)計(jì)_畢業(yè)論文.doc
約40頁(yè)DOC格式手機(jī)打開(kāi)展開(kāi)
cdc類虛擬串口固件設(shè)計(jì)_畢業(yè)論文,摘 要在接口技術(shù)高速發(fā)展的今天,串口即將成為歷史。usb等接口將逐步取代串口成為新一代最常用的接口。然而,由于之前串口較為普及,針對(duì)串口的應(yīng)用程序也非常多,而且有些功能還非常強(qiáng)大,如何能夠最大限度地減少接口更新對(duì)應(yīng)用程序的影響,成為了當(dāng)今接口技術(shù)的一個(gè)新課題。本文就基于usb的cdc類,在帶有usb口的c8051f34...


內(nèi)容介紹
此文檔由會(huì)員 莎士比亞 發(fā)布
摘 要
在接口技術(shù)高速發(fā)展的今天,串口即將成為歷史。USB等接口將逐步取代串口成為新一代最常用的接口。然而,由于之前串口較為普及,針對(duì)串口的應(yīng)用程序也非常多,而且有些功能還非常強(qiáng)大,如何能夠最大限度地減少接口更新對(duì)應(yīng)用程序的影響,成為了當(dāng)今接口技術(shù)的一個(gè)新課題。
本文就基于USB的CDC類,在帶有USB口的C8051F340單片機(jī)上,以開(kāi)發(fā)USB虛擬串口固件為目標(biāo),通過(guò)標(biāo)準(zhǔn)請(qǐng)求、設(shè)備管理、數(shù)據(jù)傳輸?shù)饶K的設(shè)計(jì)與論證,并結(jié)合固件開(kāi)發(fā)的實(shí)際,完成了USB到虛擬串口的轉(zhuǎn)換的設(shè)計(jì)。
本文的核心是建立ACM模型,即抽象控制模型。根據(jù)這個(gè)模型,對(duì)CDC類下的通信接口類和數(shù)據(jù)接口類進(jìn)行設(shè)計(jì)開(kāi)發(fā),并著重對(duì)通信接口和數(shù)據(jù)接口的各個(gè)端點(diǎn)進(jìn)行設(shè)計(jì)論證。在此基礎(chǔ)上,實(shí)現(xiàn)對(duì)USB設(shè)備的枚舉,控制以及數(shù)據(jù)傳輸?shù)裙δ?,從而為?shí)現(xiàn)USB到虛擬串口的轉(zhuǎn)換提供了保證。
關(guān)鍵詞:USB;虛擬串口;CDC;抽象控制模型
Abstract
Nowadays, as the interface technology develops in a high speed, the serial port is going to be history. Interface such as USB will replace serial port gradually and be the most common one in a new generation. However, since the widely spreading of serial port in past with great deal of development programs of serial port, and some functions are powerful, it has been a new problem that how to reduce the influence caused by interface update to application program to the maxima limit.
The paper focuses on how to convert Universal Serial Bus (USB) to a serial port in the C8051F340 microcontroller with USB port. In order to realize the function of virtual serial port, we combine with the actual firmware, design and demonstrate the standard request, device management and data transmission module.
The core of this paper is to establish an ACM , that is the Abstract Control Model. Based on this model, the data communication interface class and interface class which under the CDC are designed and developed. Focusing on the various endpoints which are included in the communication interface and data interface it has a demonstration. On this basis, it have realized the enumeration and control on the USB device, also, data transfer capabilities. Thus, it guarantees the alteration from USB to virtual serial port.
Keywords: USB; virtual serial port; Abstract Control Model
目 錄
1 引言 1
1.1 課題背景 1
1.2 課題要求 1
1.3 課題意義 2
2 相關(guān)技術(shù)及開(kāi)發(fā)工具 3
2.1 CDC類簡(jiǎn)述 3
2.2 C8051F340單片機(jī)簡(jiǎn)介 3
2.3 開(kāi)發(fā)環(huán)境簡(jiǎn)介 4
3 總體設(shè)計(jì) 6
3.1 應(yīng)用軟件的模塊設(shè)計(jì) 7
3.2 應(yīng)用軟件的功能設(shè)計(jì) 7
4 詳細(xì)設(shè)計(jì) 10
4.1 標(biāo)準(zhǔn)請(qǐng)求 10
4.1.1 設(shè)備描述符 10
4.1.2 配置描述符 11
4.1.3 接口描述符 12
4.1.4 端點(diǎn)描述符 13
4.1.5 字符串描述符 14
4.1.6 描述符設(shè)計(jì)要求 14
4.1.7 標(biāo)準(zhǔn)命令 15
4.2 類請(qǐng)求的實(shí)現(xiàn) 17
4.2.1 SEND_ENCAPSULATED_COMMAND請(qǐng)求 17
4.2.2 GET_ENCAPSULATED_RESPONSE請(qǐng)求 17
4.2.3 GET_LINE_CODING 請(qǐng)求 17
4.2.4 SET_LINE_CODING 請(qǐng)求 18
4.2.5 SET_CONTROL_LINE_STATE請(qǐng)求 19
4.3 數(shù)據(jù)傳輸?shù)膶?shí)現(xiàn) 19
4.3.1 令牌包 19
4.3.2 數(shù)據(jù)包 20
4.3.3 握手包 20
4.3.4 數(shù)據(jù)傳輸 20
4.4 INF文件的創(chuàng)建 21
4.4.2 INF文件的規(guī)范 23
4.4.3 INF文件的內(nèi)容 23
5 聯(lián)機(jī)調(diào)試 26
5.1 調(diào)試設(shè)置 26
5.2 下載調(diào)試 26
6 固件測(cè)試及結(jié)論 30
6.1 串口調(diào)試工具設(shè)置 31
6.2 數(shù)據(jù)傳輸測(cè)試 31
6.3 結(jié)論 31
參考文獻(xiàn) 33
致 謝 35
在接口技術(shù)高速發(fā)展的今天,串口即將成為歷史。USB等接口將逐步取代串口成為新一代最常用的接口。然而,由于之前串口較為普及,針對(duì)串口的應(yīng)用程序也非常多,而且有些功能還非常強(qiáng)大,如何能夠最大限度地減少接口更新對(duì)應(yīng)用程序的影響,成為了當(dāng)今接口技術(shù)的一個(gè)新課題。
本文就基于USB的CDC類,在帶有USB口的C8051F340單片機(jī)上,以開(kāi)發(fā)USB虛擬串口固件為目標(biāo),通過(guò)標(biāo)準(zhǔn)請(qǐng)求、設(shè)備管理、數(shù)據(jù)傳輸?shù)饶K的設(shè)計(jì)與論證,并結(jié)合固件開(kāi)發(fā)的實(shí)際,完成了USB到虛擬串口的轉(zhuǎn)換的設(shè)計(jì)。
本文的核心是建立ACM模型,即抽象控制模型。根據(jù)這個(gè)模型,對(duì)CDC類下的通信接口類和數(shù)據(jù)接口類進(jìn)行設(shè)計(jì)開(kāi)發(fā),并著重對(duì)通信接口和數(shù)據(jù)接口的各個(gè)端點(diǎn)進(jìn)行設(shè)計(jì)論證。在此基礎(chǔ)上,實(shí)現(xiàn)對(duì)USB設(shè)備的枚舉,控制以及數(shù)據(jù)傳輸?shù)裙δ?,從而為?shí)現(xiàn)USB到虛擬串口的轉(zhuǎn)換提供了保證。
關(guān)鍵詞:USB;虛擬串口;CDC;抽象控制模型
Abstract
Nowadays, as the interface technology develops in a high speed, the serial port is going to be history. Interface such as USB will replace serial port gradually and be the most common one in a new generation. However, since the widely spreading of serial port in past with great deal of development programs of serial port, and some functions are powerful, it has been a new problem that how to reduce the influence caused by interface update to application program to the maxima limit.
The paper focuses on how to convert Universal Serial Bus (USB) to a serial port in the C8051F340 microcontroller with USB port. In order to realize the function of virtual serial port, we combine with the actual firmware, design and demonstrate the standard request, device management and data transmission module.
The core of this paper is to establish an ACM , that is the Abstract Control Model. Based on this model, the data communication interface class and interface class which under the CDC are designed and developed. Focusing on the various endpoints which are included in the communication interface and data interface it has a demonstration. On this basis, it have realized the enumeration and control on the USB device, also, data transfer capabilities. Thus, it guarantees the alteration from USB to virtual serial port.
Keywords: USB; virtual serial port; Abstract Control Model
目 錄
1 引言 1
1.1 課題背景 1
1.2 課題要求 1
1.3 課題意義 2
2 相關(guān)技術(shù)及開(kāi)發(fā)工具 3
2.1 CDC類簡(jiǎn)述 3
2.2 C8051F340單片機(jī)簡(jiǎn)介 3
2.3 開(kāi)發(fā)環(huán)境簡(jiǎn)介 4
3 總體設(shè)計(jì) 6
3.1 應(yīng)用軟件的模塊設(shè)計(jì) 7
3.2 應(yīng)用軟件的功能設(shè)計(jì) 7
4 詳細(xì)設(shè)計(jì) 10
4.1 標(biāo)準(zhǔn)請(qǐng)求 10
4.1.1 設(shè)備描述符 10
4.1.2 配置描述符 11
4.1.3 接口描述符 12
4.1.4 端點(diǎn)描述符 13
4.1.5 字符串描述符 14
4.1.6 描述符設(shè)計(jì)要求 14
4.1.7 標(biāo)準(zhǔn)命令 15
4.2 類請(qǐng)求的實(shí)現(xiàn) 17
4.2.1 SEND_ENCAPSULATED_COMMAND請(qǐng)求 17
4.2.2 GET_ENCAPSULATED_RESPONSE請(qǐng)求 17
4.2.3 GET_LINE_CODING 請(qǐng)求 17
4.2.4 SET_LINE_CODING 請(qǐng)求 18
4.2.5 SET_CONTROL_LINE_STATE請(qǐng)求 19
4.3 數(shù)據(jù)傳輸?shù)膶?shí)現(xiàn) 19
4.3.1 令牌包 19
4.3.2 數(shù)據(jù)包 20
4.3.3 握手包 20
4.3.4 數(shù)據(jù)傳輸 20
4.4 INF文件的創(chuàng)建 21
4.4.2 INF文件的規(guī)范 23
4.4.3 INF文件的內(nèi)容 23
5 聯(lián)機(jī)調(diào)試 26
5.1 調(diào)試設(shè)置 26
5.2 下載調(diào)試 26
6 固件測(cè)試及結(jié)論 30
6.1 串口調(diào)試工具設(shè)置 31
6.2 數(shù)據(jù)傳輸測(cè)試 31
6.3 結(jié)論 31
參考文獻(xiàn) 33
致 謝 35
TA們正在看...
- 方型鑄件油壓缸結(jié)構(gòu)圖.dwg
- 縣長(zhǎng)xx自然保護(hù)區(qū)清理整頓會(huì)議發(fā)言材料.doc
- 政協(xié)副主席x縣建議提案交辦會(huì)講話材料.doc
- 馬鈴薯產(chǎn)業(yè)化可研報(bào)告.doc
- 電氣工程自動(dòng)化基礎(chǔ)知識(shí).txt
- xx乳業(yè)有限公司的項(xiàng)目可行性分析報(bào)告.doc
- xx縣紅鯉魚產(chǎn)業(yè)化經(jīng)營(yíng)項(xiàng)目可行性研究報(bào)告.doc
- 鈣果開(kāi)發(fā)試驗(yàn)的可行性研究報(bào)告.doc
- 江西省xxx縣農(nóng)業(yè)科技示范園建設(shè)項(xiàng)目可行性研究報(bào)告.doc
- 金地農(nóng)場(chǎng)節(jié)水可行性報(bào)告.doc