English
Language : 

PIC18F2455_07 Datasheet, PDF (181/430 Pages) Microchip Technology – 28/40/44-Pin, High Performance, Enhanced Flash, USB Microcontrollers with nanoWatt Technology
PIC18F2455/2550/4455/4550
17.5.1.1 Bus Activity Detect Interrupt Bit
(ACTVIF)
The ACTVIF bit cannot be cleared immediately after
the USB module wakes up from Suspend or while the
USB module is suspended. A few clock cycles are
required to synchronize the internal hardware state
machine before the ACTVIF bit can be cleared by
firmware. Clearing the ACTVIF bit before the internal
hardware is synchronized may not have an effect on
the value of ACTVIF. Additionally, if the USB module
uses the clock from the 96 MHz PLL source, then after
clearing the SUSPND bit, the USB module may not be
immediately operational while waiting for the 96 MHz
PLL to lock. The application code should clear the
ACTVIF flag as shown in Example 17-1.
EXAMPLE 17-1: CLEARING ACTVIF BIT (UIR<2>)
Assembly:
BCF
LOOP:
BTFSS
BRA
BCF
BRA
DONE:
UCON, SUSPND
UIR, ACTVIF
DONE
UIR, ACTVIF
LOOP
C:
UCONbits.SUSPND = 0;
while (UIRbits.ACTVIF) { UIRbits.ACTVIF = 0; }
© 2007 Microchip Technology Inc.
Preliminary
DS39632D-page 179