|
|
View previous topic :: View next topic |
Author |
Message |
LetThereBeLight
Joined: 15 Jul 2007 Posts: 3
|
18F2455 FUSE OSCILLATOR & USB |
Posted: Sun Jul 15, 2007 5:57 am |
|
|
Hi all,
i have a little question, i use a PIC 18F2455 for USB communication between my device and USB. I use a 20 MHZ quartz oscillator with thoses fuses :
Code: | #fuses HS,PLL5,USBDIV,NOWDT,NOPROTECT,NOLVP,NODEBUG,VREGEN,NOMCLR,NOIESO,NOSTVREN,NOPUT
#use delay(clock=20000000) |
it works perfectly .
I xwould like to speed up my PIC and use a 48 MHz quartz , i use thoses fuses with this quartz :
Code: |
#fuses HS,PLL12,USBDIV,NOWDT,NOPROTECT,NOLVP,NODEBUG,VREGEN,NOMCLR,NOIESO,NOSTVREN,NOPUT
use delay(clock=48000000)
|
in this case the PIC is still working but not the USB. so i check the datasheet, i looks like for 48 MHz you cannot use a Crystal but an EC oscillator type ?
am I wrong ? what should i change with the fuse to get USB working at full speed ? |
|
|
Ttelmah Guest
|
|
Posted: Sun Jul 15, 2007 7:18 am |
|
|
Use the original quartz, and:
Code: |
#fuses HSPLL,PLL5,USBDIV,NOWDT,NOPROTECT,NOLVP,NODEBUG,VREGEN,
NOMCLR,NOIESO,NOSTVREN,NOPUT,CPUDIV1
|
'HSPLL', means use the HS oscillator, but take the CPU clock from the USB PLL output (96MHz). You then add the CPUDIV fuse to specify the division (/1). The USB clock is automatically divided by 2 before being fed to the CPU divider, so you get 48MHz to the CPU.
The maximum frequency for the external oscillator, is 25MHz.
Best Wishes |
|
|
LetThereBeLight
Joined: 15 Jul 2007 Posts: 3
|
|
Posted: Mon Jul 16, 2007 1:29 am |
|
|
thank you |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|