MicrocontrollerapplicationscaneasilysupportUSB

embeddedhostfunctionalitywiththeintroductionof

Microchip’smicrocontrollerswiththeUSBOTG

peripheral.Traditionally,personalcomputershavebeen

usedashostsinaUSBnetwork.Microchip’sUSBOTG

productlinecannowreplacethepersonalcomputerin

thesystembyimplementinganembeddedhost.

Manyembeddedapplicationsrequirecontrolinputsfrom

externaldevices,suchaskeyboards,mice,joysticks,

Point-of-Sale(POS)barcodescannersandmagnetic

codereadershavingHIDKeyboardEmulationmode.

Thisapplicationnotedemonstrateshowtodevelopa

USBkeyboardapplicationthatcanrunontheExplorer

16demoboardwithaUSBPICtail™Plusdaughter

boardusingaMicrochipUSBOTGmicrocontrollerasthe

embeddedhost.AN1212UsingUSBKeyboardwithanEmbeddedHostasCtrl,Shift,AltandGUIkeysmakeupthe8-bitmodifierAuthor:AmardeepGuptabyteinastandardkeyboardreport.Byte1ofthisreportMicrochipTechnologyInc.isaconstant.ThisbyteisreservedfortheuseoftheOriginalEquipmentManufacturer(OEM).INTRODUCTIONTable2describesthekeyboardoutputreport(1byte).Microcontrollerapp

用嵌入式主机的USB键盘

用嵌入式主机的USB键盘