It would have been much easier to start with mister_e's example ....
Apparently, you have an 18F2550.INC file in your project folder where you are changing the configs.
PBP won't use that file. It uses the one in the PBP folder.
But you should really put the configs in your program, and comment out the configs in the 18F2550.inc file in the PBP folder.
Use these ...
Code:
asm
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_ON_2L & _BORV_2_2L & _VREGEN_ON_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H
__CONFIG _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
endasm
Then remove the pauses in your loops, USBSERVICE must be called every ~1ms or less. (when enumerating)
After making those changes, I was able to get your program to enumerate on an 18F4550. Don't have a 2550.
Bookmarks