Hi,
not sure if your Oscillator is set to the correct frequency. 20MHz; should this not be 48MHz? Are you defining the configs correctly for use with PLL?
For a 20MHz crystal I use these:
CheersCode:'Config1L ' Full-speed USB Clock Source Selection: Clock Source from 96MHz PLL/2 ' CPU System Clock Postscaler: Prescaler Divide by 5 for 20MHz Crystal ' 96MHz Prescaler: Divide by 5 (20MHz Input) @ __CONFIG _CONFIG1L, _USBDIV_2_1L & _CPUDIV_OSC1_PLL2_1L & _PLLDIV_5_1L 'Config1H 'Oscillator: HS oscillator, PLL enabled, HS used by USB 'Fail-Safe Clock Monitor Enable: Enabled 'Internal External Switch Over Mode: Disabled @ __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H & _FCMEM_ON_1H & _IESO_OFF_1H
Rob




Bookmarks