USB转换器范例展示一个PS2®软分离功能
ThisTechnicalBriefdescribesthecreationofaUSB
devicethatcanenumerateasamouseorasa
keyboard,dependingonwhichPS/2
®
peripheralis
pluggedintoit.TheSoftDetachprovisionofthe
PIC16C745/765supportfirmwaremakesthecreation
ofsuchadevicepossible.TechnicalBriefs,TB055and
TB056,describeindetailtheimplementationofaPS/2
toUSBmousetranslatorandaPS/2toUSBkeyboard
translator,respectively.ThisBriefwillnotdiscussthe
translationofeitherofthesetwodevices.Itfocuseson
theSoftDetachfunctionandmodifyingthedescriptor
jumptableforadevicewithmultiplesetsofdescriptors.
TB058DemonstratingtheSoftDetachFunctionWithaPS/2toUSBTranslatorExampleSoftDetachisoneofthemostusefulfeaturesonAuthor:RestonConditMicrochip'sPIC16C745/765USBmicrocontroller.TheMicrochipTechnologyInc.reasontheSoftDetachcommandissouseful,isthat,inapplicationssuchasthisone,nospecialdriverneedstobecreatedforthehost.ThemoretypicalINTRODUCTION