PS2鼠标规范说明.docx

上传人:b****1 文档编号:14117273 上传时间:2023-06-20 格式:DOCX 页数:10 大小:39.86KB
下载 相关 举报
PS2鼠标规范说明.docx_第1页
第1页 / 共10页
PS2鼠标规范说明.docx_第2页
第2页 / 共10页
PS2鼠标规范说明.docx_第3页
第3页 / 共10页
PS2鼠标规范说明.docx_第4页
第4页 / 共10页
PS2鼠标规范说明.docx_第5页
第5页 / 共10页
PS2鼠标规范说明.docx_第6页
第6页 / 共10页
PS2鼠标规范说明.docx_第7页
第7页 / 共10页
PS2鼠标规范说明.docx_第8页
第8页 / 共10页
PS2鼠标规范说明.docx_第9页
第9页 / 共10页
PS2鼠标规范说明.docx_第10页
第10页 / 共10页
亲,该文档总共10页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

PS2鼠标规范说明.docx

《PS2鼠标规范说明.docx》由会员分享,可在线阅读,更多相关《PS2鼠标规范说明.docx(10页珍藏版)》请在冰点文库上搜索。

PS2鼠标规范说明.docx

PS2鼠标规范说明

PS/2ModeSpecification

Operatingmode

TherearefouroperatingmodesinPS/2mouse:

A.ResetMode:

Inthismodeaself-testisinitiatedduringpower-onorbyaResetcommand.Afterresetsignal,PS/2mousewillsend:

1).CompletioncodeAA&IDcode00.

2).Setdefault:

samplingrate:

100reports/s

non-autospeed

2dot/count

disable

B.StreamMode:

Themaximumrateoftransferistheprogrammedsamplerate.Datareportistransmittedif

1).switchispressed

2).movementhasbeendetect

C.RemoteMode:

DataistransmittedonlyinresponsetoaReadDatacommand.

D.WrapMode:

Anybyteofdatabythesystem,excepthexEC(Resetwrapmode)orhexFF(Reset),isreturnedbyMouseController.

PS/2MouseDataReport:

A.Instreammode:

Adatareportissentattheendofasampleinterval.

B.Inremotemode:

AdatareportissentinresponsetoReadDatacommand.

C.Datareportformat:

 

Byte

Bit

Description

1

0

Leftbuttonstatus;1=pressed

1

Rightbuttonstatus;1=pressed

2

Middlebuttonstatus;1=pressed

3

Reserve

4

Xdatasign;1=negative

5

Ydatasign;1=negative

6

Reserve

7

Reserve

2

0-7

Xdata(D0-D7)

3

0-7

Ydata(D0-D7)

PS/2MouseDataTransmission:

D.MouseControllergeneratestheclockingsignalwhensendingdatatoandreceivingdatafromthesystem.

E.ThesystemrequestsMouseControllerreceivesystemdataoutputbyforcingtheDATAlinetoaninactivelevelandallowingCLKlinetogotoanactivelevel.

F.Datatransmissionframe:

 

Bit

Function

1

Startbit(always0)

2-9

Databits(D0-D7)

10

Paritybit(oddparity)

11

Stopbit(always1)

G.DataOutput(datafromMouseControllertosystem):

IfCLKislow(inhibitstatus),dataisnotransmission.IfCLKishighandDATAislow(request-to-send),dataisupdated.DataisreceivedfromthesystemandnotransmissionarestartedbyMouseControlleruntilCLKandDATAbothhigh.

IfCLKandDATAarebothHigh,thetransmissionisready.DATAisvalidpriortothefallingedgeofCLKandbeyondtherisingedgeofCLK.Duringtransmission,MouseControllercheckforlinecontentionbycheckingforaninactivelevelonCLKatintervalsnottoexceed100usec.ContentionoccurswhenthesystemlowersCLKtoinhibitMOUSEControlleroutputafterMouseControllerhasstartedatransmission.Ifthisoccursbeforetherisingedgeofthetenthclock,MouseControllerinternalstoreitsdatainitsbufferandreturnsDATAandCLKtoanactivelevel.Ifthecontentiondoesnotoccurbythetenthclock,thetransmissioniscomplete.

Followingatransmission,thesysteminhibitsMouseControllerbyholdingCLKlowuntilcanservicetheinputoruntilthesystemreceivesarequesttosendaresponsefromMouseController.

H.DataInput(fromsystemtoMouseController):

First,SystemchecksifMouseControlleristransmittingdata.IfMouseControlleristransmitting,thesystemcanoverridetheoutputforcingCLKtoaninactivelevelpriortothetenthclock.IfMouseControllertransmissionisbeyondthetenthclock,thesystemreceivesthedata.

IfMouseControllerisnottransmittingorifthesystemchoosetooverridetheoutput,thesystemforceCLKtoaninactivelevelforaperiodofnotlessthen100usecwhilepreparingforoutput.Whenthesystemisreadytooutputstartbit(0),itallowsCLKgotoactivelevel.

Ifrequest-tosendisdetected,MouseControllerclocks11bits.Followingthetenthclock,MouseControllerchecksforanactivelevelontheDATAline,andiffound,forceDATAlow,andclockoncemore.Ifoccursframingerror,MouseControllercontinuetoclockuntilDATAishigh,thenclocksthelinecontrolbitandrequestaResend.

Whenthesystemsendsoutacommandordatatransmissionthatrequiresaresponse,thesystemwaitsforMouseControllertoresponsebeforesendingitsnextoutput.

PS/2MouseErrorHandling:

A.AResendcommand(FE)followingreceiptofaninvalidinputoranyinputwithincorrectpolarity.

B.Iftwoinvalidinputsarereceivedinsuccession,anerrorcodeofhexFCsendtothesystem.

C.Thecountaccumulatorsareclearedafterreceivinganycommandexcept"Resend".

D.MouseControllerreceivesaResendcommand(FE),ittransmititslastpacketofdata.

E.Instreammode,"Resend"isreceivedbyMouseControlleranda3-bytedatapacketwillfollowtotransmittothesystem.MouseControllerresendsthe3-bytedatapacketpriortoclearingthecounter.

F.Aresponseissentwithin25msif

I.Thesystemrequiresaresponse

⒑.Anerrorisdetectedinthetransmission

G.Whenacommandrequiringaresponseisissuedbythesystem,anothercommandshouldnotbeissueuntileithertheresponseisreceivedor25mshaspassed.

PS/2MouseCommandsDescription:

Thereare16validcommandsthattransmittsbetweenthesystemandMouseController.The"FA"codeisalwaysthefirstresponsetoanyvalidinputreceivedfromthesystemotherthanaSetWrapModeorResendcommand.Followingtableisthelistofcommands:

MouseController

HexCode

Command

echocode

FF

Reset

FA,AA,00

FE

Resend

XX,(XX,XX)

F6

SetDefault

FA

F5

Disable

FA

F4

Enable

FA

F3,XX

SetSamplingRate

FA,FA

F2

ReadDeviceType

FA,00

F0

SetRemoteMode

FA

EE

SetWrapMode

FA

EC

ReseWrapMode

FA

EB

ReadData

FA,XX,XX,XX

EA

SetStreamMode

FA

E9

StatusRequest

FA,XX,XX,XX

E8,XX

SetResolution

FA,FA

E7

SetAutospeed

FA

E6

ResetAutospeed

FA

Thefollowingdescribesvalidcommands:

A.Reset(FF)

MouseControlleroperation:

⒐.Completionthereset.

⒑.TransmittedFA,AA,00tothesystem.

⒒.Setdefault:

samplingrate:

100reports/s

non-autospeed

streammode

2dot/count

disable

B.Resend(FE)

⒐.AnytimeMouseControllerreceivesaninvalidcommand,itreturnsaResendcommandtothesystem.

⒑.WhenMouseControllerreceivesaResendcommand,itretransmitsitslastpacketofdata.IfthelastpacketwasaResendcommand,ittransmitsthepacketjustpriortotheResendcommand.

⒒.Instreammode,ifaResendcommandisreceivedbyMouseControllerimmediatelyfollowinga3-bytedatapackettransmissiontothesystem.

C.SetDefault(F6)

Thecommandreinitializesallconditionstothepower-ondefaults.

D.Disable(F5)

ThiscommandisusedinthestreammodetostoptransmissionsfromMouseController.

E.Enable(F4)

Beginstransmissions,ifinstreammode.

F.SetSamplingRate(F3,XX)

Instreammode,thiscommandsetthesamplingratetothevalueindicatedbybytehexXX,showninfollowing:

Second

byteXX

SampleRate

0A

10/sec

14

20/sec

28

40/sec

3C

60/sec

50

80/sec

64

100/sec

C8

200/sec

 

default100/sec

G.ReadDeviceType(F2)

MouseControlleralwaysechoes"FA,00"followingthiscommand.

H.SetRemoteMode(F0)

DatavaluesarereportedonlyinresponsetoaReadDatacommand.

I.SetWrapMode(EE)

WrapmoderemainsuntilReset(FF)orResetWrapMode(EC)isreceived.

J.ResetWrapMode(EC)

MouseControllerreturnstothepreviousmodeofoperationafterreceivingthiscommand.

K.ReadData(EB)

Thiscommandisexecutedineitherremoteorstreammode.Thedataistransmittedeveniftherehasbeennomovementsincethelastreportorthebuttonstatusisunchanged.FollowingaReadDatacommand,theregistersareclearedafteradatatransmission.

L.SetStreamMode(EA)

ThiscommandsetsMouseControllerinstreammode.

M.StatusRequest(E9)

Whenthiscommandisissuedbythesystem,MouseControllerrespondswitha3-bytestatusreportasfollows:

Byte

Bit

Description

1

0

1=Rightbuttonpressed

1

1=Middlebuttonpressed

2

1=Leftbuttonpressed

3

Reserved

4

0=Normalspeed,1=Autospeed

5

0=Disabled,1=Enabled

6

0=Streammode,1=Remotemode

7

Reserved

2

0-7

Currentresolutionsetting(D0-D7)

3

0-7

Currentsamplingrate(D0-D7)

N.SetResolution(E8,XX)

MouseControllerprovidesfourresolutionsselectedbythesecondbytethesecondbyteofthiscommandasfollows:

Second

ByteXX

Resolution

00

8dot/count

01

4dot/count

02

2dot/count

03

1dot/count

 

O.SetAutospeed(E7)

Attheendofasampleintervalinthestreammode,thecurrentXandYdatavaluesareconvertednewvalues.Thesignbitearenotinvolvedinthisconversion.Theconversionisonlyinstreammode.Therelationshipbetweentheinputandoutputcountfollows:

Input

Output

0

0

1

1

2

1

3

3

4

6

5

9

N(6)

2.0*N

 

P.ResetAutospeed(E6)

Thiscommandrestoretonormalspeed.

SerialModeSpecification

InMicrosoftmode,thetransmissioncycleconsistsofthreebytes.Eachbytesisdividedintoonestartbit,sevendatabitsandtwostopbits.Thefirstbytecontains"L","R"switchstatusandfourbitsofthetwomostsignificantbitsinhorizontalcounterandverticalcounter,Thenextbyterepresentsthevalueaccumulatedbyhorizontalcounter,thelastbyteisthedataoftheverticalcount.

Outputbytearrange

bitno.....6543210

1stbyte.....1LRV7'V6'H7H6

2ndbyte.....0H5H4H3H2H1H0

3rdbyte.....0V5'V4'V3'V2'V1'V0'

TimingDiagram

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2