freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于ps2鼠標(biāo)接口單片機輸入設(shè)備的實現(xiàn)畢業(yè)論文(參考版)

2025-06-30 18:27本頁面
  

【正文】 Mouse。Communication protocol。s reset model and stream model, and so on. According to the above solution, I make a PS/2 mouse interface device. This topic provides two basic function testing, two performance testing and a patibility testing for the device. The device obtains an ideal result in the testing. Finally I extend PS/2 mouse interface device and I switch serial port to PS/2 mouse device. This device39。Implementation of MCU Input DeviceBased on PS / 2 mouse interfaceAbstract:PS/2 interface is an earlier puter interface, and it is also one of the most widely used interfaces. It is mainly applied to the input of the mouse, keyboard and game joysticks. PS/2 is a concise interface protocol which is easy to realize. Also, PS/2 equipments have a stable operation performance for many years. It is these advantages that make the ancient PS/2 interfaces have an important role in the field of input interface. Based on detailed analysis, this topic puts forward a set of feasible program which aims to realize PS/2 mouse interface device. The program provides a realization method of a PS/2 mouse interface device39。論該生能夠理論聯(lián)系實際,并進(jìn)行一定的創(chuàng)新,在畢業(yè)設(shè)計期間,工作量飽滿,查閱了多種資料,做了大量的測試實驗,表現(xiàn)出較強的分析問題和解決問題的能力。該設(shè)計應(yīng)用單片機模擬PS/2時序,不僅實現(xiàn)單片機模擬鼠標(biāo)與PC的通信,而且對題目進(jìn)行了擴(kuò)展,完成了串口信號向PS/2信號的轉(zhuǎn)換。 } }end:} //隊列內(nèi)的包數(shù)加一 if(FIFO_DL_N8) //若隊列溢出,丟掉隊列頭上的包 { FIFO_DL_H=(FIFO_DL_H+4)%32。 if(FIFO_DL_byte==4) //如果接收夠四個字節(jié) { FIFO_DL_byte=0。 //入隊 if(FIFO_DL_L==32) //循環(huán)隊列 FIFO_DL_L=0。0xF8)!=0x50) //如果報頭格式錯誤就丟棄 goto end。 r=SBUF。 } }}}void ReceiveData(void) interrupt 4{ char r。 t=0。 if(t20) //超時則該主機一直通信, goto d1。 while(CLK==0) { delay8us()。 if(t20) //超時則該主機一直通信, goto d1。 //循環(huán)計時器清零 while(CLK==0) { delay8us()。 //初始化串口 rcv_b_bit=0。 } return 0。 sendbyte(0xfa)。 break。 while(CLK==0||DAT==0)。 while(CLK==0||DAT==0)。 while(CLK==0||DAT==0)。 case 0xE9: //主機請求設(shè)備狀態(tài) while(CLK==0||DAT==0)。 sendbyte(0x00)。 sendbyte(0xfa)。 break。 case 0xFE: //主機要求設(shè)備重發(fā)最后一個數(shù)據(jù)報 while(CLK==0||DAT==0)。cansend=0。 case 0xF4: //主機使能設(shè)備 while(CLK==0||DAT==0)。 sendbyte(0x00)。 sendbyte(0xAA)。 delayms(200)。 cansend=0。 sendbyte(0xfa)。}int rcv(){ receivebyte()。 data_analyse()。_nop_()。_nop_()。 _nop_()。 delay32us()。_nop_()。_nop_()。 //應(yīng)答位 _nop_()。_nop_()。_nop_()。 _nop_()。_nop_()。_nop_()。_nop_()。_nop_()。//接收十位數(shù)據(jù) } //應(yīng)答 _nop_()。 delay8us()。 delay32us()。rcv_buffer_bit++) { delay8us()。 for(rcv_buffer_bit==0。 delay32us()。 CLK=1。 CLK=0。 //一個停止位,總是為1 DAT=1。 CLK=1。 CLK=0。 DAT=~P。 } //一個奇偶校驗位 delay8us()。 CLK=1。 CLK=0。0x01。i=7。 delay8us()。 delay40us()。 //開始位 delay8us()。 delay40us()。main()函數(shù)。 //隊列中接收到一個包的字節(jié)數(shù)。 //隊列尾unsigned char FIFO_DL_N。   //上游主機發(fā)送的數(shù)據(jù)緩存隊列 unsigned char FIFO_DL_H。隊列定義:unsigned char FIFO_data[4]。在為避免串口發(fā)送不完整的鼠標(biāo)數(shù)據(jù)報而導(dǎo)致數(shù)據(jù)混論,規(guī)定串口再發(fā)送數(shù)據(jù)報的時候,在數(shù)據(jù)報前面再加一個字節(jié)的報頭標(biāo)志。并將接收到的數(shù)據(jù)放入緩存區(qū)。該文件并非
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1