CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

18F2455 FUSE OSCILLATOR & USB

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
LetThereBeLight



Joined: 15 Jul 2007
Posts: 3

View user's profile Send private message

18F2455 FUSE OSCILLATOR & USB
PostPosted: Sun Jul 15, 2007 5:57 am     Reply with quote

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







PostPosted: Sun Jul 15, 2007 7:18 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Jul 16, 2007 1:29 am     Reply with quote

thank you
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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