DM163010 Microchip Technology, DM163010 Datasheet - Page 47

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
©
2001 Microchip Technology Inc.
4.5.2
4.5.1.3
GetEPn (Buffer Pointer) returns data sent from the host. Provided with a
buffer pointer in FSR/IRP, if there is a buffer available (data has been received
from the host), the data it is copied to the destination pointed to by FSR/IRP.
The endpoint is set with a set instruction preceding the function definition. If
no data is available, it returns a failure code. Thus, the functions of polling for
buffer ready and copying the data are combined into one function.
Protocol Layer Functions
4.5.2.1
ServiceUSBlnt handles all interrupts generated by the USB peripheral. First,
it copies the active buffer to common RAM, which provides a quick turn-
around on the buffer in dual port RAM. It also avoids having to switch banks
during processing of the buffer.
4.5.2.2
StallUSBEP/UnstallUSBEP sets or clears the STALL bit in the endpoint con-
trol register. The STALL bit indicates to the host that user intervention is
required and until such intervention is made, further attempts to communicate
with the endpoint will not be successful. Once the user intervention has been
made, UnstallUSBEP will clear the bit, allowing communications to take
place. These calls are useful in signaling the host that user intervention is
required. An example of this might be a printer out of paper.
4.5.2.3
SoftDetachUSB clears the DEV_ATT bit, electrically disconnecting the device
from the bus, then reconnecting so it can be re-enumerated by the host. This
process takes approximately 50 ms, to ensure that the host has seen the
device disconnect and re-attach to the bus.
4.5.2.4
CheckSleep tests the UCTRL.UIDLE bit if set, indicating that there has been
no activity on the bus for 3 ms. If set, the device can be put to SLEEP, which
puts the part into a Low Power Standby mode until awakened by bus activity.
This has to be handled outside the ISR because we need the interrupt to
wake us from SLEEP, and because the application may not be ready to
SLEEP when the interrupt occurs. Instead, the application should periodically
call this function to poll the bit when the device is in a good place to SLEEP.
GetEPn
StallUSBEP/UnstallUSBEP
SoftDetachUSB
CheckSleep
ServiceUSBlnt
Chapter 9 USB Firmware
DS41174A-page 43

Related parts for DM163010