DM163010 Microchip Technology, DM163010 Datasheet - Page 50

BOARD DEMO PICDEM USB

DM163010

Manufacturer Part Number
DM163010
Description
BOARD DEMO PICDEM USB
Manufacturer
Microchip Technology
Datasheet

Specifications of DM163010

Processor To Be Evaluated
PlC16C745/765
Interface Type
USB
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
PICDEM™ USB User’s Guide
Example 4.1: USB Peripheral Demo Program
4.8
DS41174A-page 46
; ******************************************************************
; Demo program that initializes the USB peripheral, allows the Host
;
; ******************************************************************
Main
CheckEP1
PutBuffer
pagesel
call
pagesel
ConfiguredUSB
bankisel
pagesel
movlw
movwf
call
pagesel
btfss
goto
bankisel
pagesel
movlw
movwf
movlw
call
pagesel
btfss
goto
pagesel
goto
end
Multiple Configuration or Report Descriptors
to Enumerate, then copies buffers from EP1OUT to EP1IN.
InitUSB
InitUSB
Main
BUFFER
GetEP1
BUFFER
FSR
GetEP1
CheckEP1
STATUS,C
CheckEP1
BUFFER
PutEP1
BUFFER
FSR
0x08
PutEP1
PutBuffer
STATUS,C
PutBuffer
CheckEP1
CheckEP1
The Ch9 firmware makes allowances for the fact that more than one configu-
ration or report descriptor may be desired. Allowances for multiple interface,
HID, and endpoint descriptors were not made, because they are not needed.
These descriptors are all read in with the configuration descriptor, regardless
of how many there are.
; Set up everything so we can enumerate
; wait here until we have enumerated.
; Check Endpoint 1 for an OUT transaction
; point to lower banks
; point FSR to our buffer
; If data is ready, it will be copied.
; was there any data for us?
; Nope, check again.
; point to lower banks
; point FSR to our buffer
; send 8 bytes to endpoint 1
; was it successful?
; No: try again until successful
; Yes: restart loop
©
2001 Microchip Technology Inc.

Related parts for DM163010