If there is no device, or Windows shows Device Descriptor Request Failed, the PC has not completed the first USB exchange. Changing the product name usually does not help at this stage.
Check the basic setup
- Select the exact PIC and program the matching configuration words.
- Check that the physical clock source and Declare Xtal match the generated setup.
- Run the PLL enable, readiness checks and USB clock setup before communication starts.
- Check D+, D-, ground, supply and the required regulator parts against the PIC datasheet.
- Keep the generated USB service running before USB_Configured becomes 1 as well as afterward.
- Do not call Clear afterward or overwrite registers managed by USB.
- In interrupt mode, install the generated vector, USB source enable, interrupt priority and global interrupt gates.
Check whether the interrupt can run
An interrupt handler that is never entered cannot handle the first USB exchange. Another interrupt can also block useful work if its flag is not handled and it keeps firing.
Return temporarily to the generated minimal program. If that works, add your application code back a little at a time. If it does not, focus on the board, clock and interrupt setup first.
See also
Created with the Personal Edition of HelpNDoc: Qt Help documentation made easy