【正文】
0xF4)。通過(guò)單擊鼠標(biāo)左鍵,可改變鼠標(biāo)的顏色;單擊鼠標(biāo)右鍵,可亮滅目標(biāo)板的發(fā)光二極管。具有成本低、效果好,模塊化、移植性高等特點(diǎn)。 與此同時(shí),當(dāng)前嵌入式系統(tǒng)技術(shù)已經(jīng)得到了廣泛應(yīng)用,但傳統(tǒng)的嵌入式系統(tǒng)的人機(jī)接口多采用小鍵盤(pán)操作的文本菜單方式,使用戶(hù)操作較為不便。 若驅(qū)動(dòng)此類(lèi)顯示器,需要很高的掃面頻率,以 及極短的處理時(shí)間。與嵌入式系統(tǒng)中常用的顯示器相比,它具有顯示面積大、色彩豐富、承載信息量大、接口簡(jiǎn)單等優(yōu)點(diǎn),如果將其應(yīng)用到嵌入式系統(tǒng)中,可以顯著提升產(chǎn)品的視覺(jué)效果。 state machine。 PS/2 mouse。此方法有容易實(shí)現(xiàn)模塊化和移植性強(qiáng)的特點(diǎn)。 PS/2鼠標(biāo)、鍵盤(pán)是一種常用的計(jì)算機(jī)輸入設(shè)備,只需稍加改動(dòng),便可很方便的應(yīng)用在各種嵌入式設(shè)備中。 基于 FPGA 的 PS2 鼠標(biāo)接口設(shè)計(jì)與應(yīng)用 摘 要 現(xiàn)今生活中,各式各樣的生活用品慢慢地走上“智能”的道路,越來(lái)越令人感覺(jué)到方便。這與一個(gè)優(yōu)秀的人機(jī)交流界面密不可分。利用現(xiàn)場(chǎng)可編程門(mén)陣列 FPGA芯片,應(yīng)用硬件描述語(yǔ)言 Verilog設(shè)計(jì), 采用層次化模塊編程思想, 接收處理 PS/2接口鼠標(biāo)輸入信息,并用 VGA接口 作為輸出設(shè)備,顯示當(dāng)前鼠標(biāo)狀態(tài)及位置。 關(guān)鍵詞 : FPGA; PS/2鼠標(biāo); VGA;狀態(tài)機(jī);嵌入式系統(tǒng) The Design And Application of PS/2 Mouse Interface Based on FPGA Abstract: A wide range of life products increasingly walk up “brainpower” road, and then it is more and more convenient to use them. This is an excellent manmachine intermunication interface closely. PS/2 mouse or keyboard is a general input device of pute system. It can be easily equipped with various embedded systems. FieldProgrammable Gate Array(FPGA) chip is used, verilog HDL is applied, and programming of modularization is adopted. It can receive and process the input information of the PS/2 interface mouse. And then VGA is used as output device, to show the current status and location of the mouse. This method is achieved the features of easy modularity and powerful transplantable capability. Key words: FPGA。 VGA。 embedded system 目 錄 1 緒論 ............................................................................................................................ 1 設(shè)計(jì)的來(lái)源及意義 .......................................................................................... 1 設(shè)計(jì)的內(nèi)容與要求 ........................................................................................... 1 設(shè)計(jì)的總體思想 ............................................................................................... 1 2 硬件介紹 .................................................................................................................... 2 FPGA 概述 ....................................................................................................... 2 FPGA 的發(fā)展歷程 ................................................................................. 2 什么是可編程器件 ................................................................................ 3 FPGA 的結(jié)構(gòu)和特性 ....................................................................................... 3 FPGA 基本結(jié)構(gòu) ..................................................................................... 3 主流 FPGA 產(chǎn)品及開(kāi)發(fā)工具 ............................................................... 5 FPGA 與 CPLD 及 ASIC 的比較 .......................................................... 6 FPGA 的開(kāi)發(fā)流程 ........................................................................................... 8 3 VGA 介紹 ..................................................................................................................... 9 VGA 發(fā)展及定義 ............................................................................................. 9 VGA 顯示原理 ............................................................................................... 10 VGA 的電氣特性 ................................................................................. 10 VGA 的驅(qū)動(dòng)概念 ................................................................................. 11 VGA 的時(shí)序分析 ................................................................................. 12 4 PS/2 鼠標(biāo)通信協(xié)議 ................................................................................................. 14 PS/2 接口硬件 ................................................................................................ 14 PS/2 通信協(xié)議 ................................................................................................ 14 PS/2 協(xié)議概述 ...................................................................................... 14 PS/2 設(shè)備到主機(jī)的通信 ...................................................................... 15 主機(jī)到 PS/2 設(shè)備的通信 ..................................................................... 15 PS/2 協(xié)議鼠標(biāo) ................................................................................................ 16 PS/2 鼠標(biāo)介紹 ...................................................................................... 16 PS/2 鼠標(biāo)的工作模式 .......................................................................... 17 PS/2 鼠標(biāo)的數(shù)據(jù)包結(jié)構(gòu) ...................................................................... 17 5 軟件設(shè)計(jì) ................................................................................................................... 18 總體設(shè)計(jì) ................................................................