DM163010 Microchip Technology, DM163010 Datasheet - Page 48

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
4.6
DS41174A-page 44
Behind the Scenes
4.6.1
Prior to putting the device to SLEEP, CheckSleep enables the activity inter-
rupt so the device will be awakened by the first transition on the bus. The
PICmicro MCU will immediately jump to the ISR, which recognizes the activity
interrupt and then disables the interrupt and resumes processing with the
instruction following the CheckSleep call.
4.5.2.5
ConfiguredUSB (Macro) continuously polls the enumeration status bits and
waits until the host has configured the device. This should be used after the
call to InitUSB and prior to the first time your application attempts to commu-
nicate on the bus.
4.5.2.6
SetConfiguration is a callback function that allows your application to associ-
ate some meaning to a Set Configuration command from the host. The Chap-
ter 9 software stores the value in USB_Curr_Config so it can be reported back
on a Get Configuration call. This function is also called passing the new con-
figuration into W. This function is called from within the ISR so it should be
kept as short as possible.
InitUSB
InitUSB clears the error counters and enables the 3.3V regulator and the
USB Reset interrupt. This implements the requirement to prevent the
PICmicro MCU from responding to commands until the device has been
RESET.
The host sees the device and resets the device to begin the enumeration pro-
cess. The RESET then initializes the Buffer Descriptor Table (BDT) and End-
Point Control Registers, in addition to enabling the remaining USB interrupt
sources.
The interrupt transfers control to the interrupt vector (address 0x0004). Any
Interrupt Service Routine must preserve the processor state by saving the
FSR’s that might change during interrupt processing. We recommend saving
W, STATUS, PCLATH, and FSR. W can be stored in Common RAM to avoid
banking issues. Then, the Interrupt Service Routine starts polling the interrupt
flags to see what triggered the interrupt. The USB interrupts are serviced by
calling ServiceUSBInt, which further tests the USB interrupt sources to deter-
mine how to process the interrupt.
ConfiguredUSB
SetConfiguration
©
2001 Microchip Technology Inc.

Related parts for DM163010