PIC18F-LF1XK50 MICROCHIP [Microchip Technology], PIC18F-LF1XK50 Datasheet - Page 265

no-image

PIC18F-LF1XK50

Manufacturer Part Number
PIC18F-LF1XK50
Description
20-Pin USB Flash Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
22.5
The USB module can generate multiple interrupt con-
ditions. To accommodate all of these interrupt sources,
the module is provided with its own interrupt logic
structure, similar to that of the microcontroller. USB
interrupts are enabled with one set of control registers
and trapped with a separate set of flag registers. All
sources are funneled into a single USB interrupt
request, USBIF (PIR2<2>), in the microcontroller’s
interrupt logic.
FIGURE 22-7:
FIGURE 22-8:
 2010 Microchip Technology Inc.
Note
Differential Data
USB Interrupts
1:
The control transfer shown here is only an example showing events that can occur for every transaction. Typical control transfers
will spread across multiple frames.
USB Reset
URSTIF
RESET
UEIR (Flag) and UEIE (Enable) Registers
CRC5EE
CRC5EF
Start-of-Frame (SOF)
BTOEE
BTSEE
BTOEF
BTSEF
Second Level USB Interrupts
PIDEE
PIDEF
CRC16EF
CRC16EE
USB INTERRUPT LOGIC FUNNEL
EXAMPLE OF A USB TRANSACTION AND INTERRUPT EVENTS
DFN8EE
DFN8EF
(USB Error Conditions)
SOFIF
SOF
SETUP
DATA
Preliminary
STATUS
Figure 22-7
module. There are two layers of interrupt registers in
the USB module. The top level consists of overall USB
Status interrupts; these are enabled and flagged in the
UIE and UIR registers, respectively. The second level
consists of USB error conditions, which are enabled
and flagged in the UEIR and UEIE registers. An
interrupt condition in any of these triggers a USB Error
Interrupt Flag (UERRIF) in the top level.
Interrupts may be used to trap routine events in a USB
transaction.
within a USB frame and their corresponding interrupts.
SETUP Token
STALLIE
STALLIF
UERRIE
UERRIF
ACTVIF
ACTVIE
URSTIE
OUT Token
URSTIF
Control Transfer
IDLEIE
From Host
IN Token
IDLEIF
From Host
SOFIE
TRNIE
From Host
SOFIF
TRNIF
UIR (Flag) and UIE (Enable) Registers
Top Level USB Interrupts
PIC18F/LF1XK50
(USB Status Interrupts)
Empty Data
Figure 22-8
Transaction
shows the interrupt logic for the USB
From Host
From Host
To Host
(1)
Data
Data
From Host
shows some common events
To Host
To Host
ACK
ACK
ACK
SOF
1 ms Frame
USBIF
DS41350E-page 265
Set TRNIF
Set TRNIF
Set TRNIF
Transaction
Complete

Related parts for PIC18F-LF1XK50