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 CCS Technical Support

PIC 18f46j53 internal clock and USB low speed

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



Joined: 13 Dec 2010
Posts: 1

View user's profile Send private message

PIC 18f46j53 internal clock and USB low speed
PostPosted: Mon Dec 13, 2010 11:04 am     Reply with quote

Hi to all.

I am trying to connect PIC 18F46J53 via low speed USB. I want to use 16MHz internal clock. If I understand it correctly, I have to set fuse bit LS48MHZ. But there is no option in CCS compiler.

How can I set the fuse #FUSES LS48MHZ to make USB low speed work with internal 16MHz clock?

I am using CCS 4.114 compiler embeded in MPLAB.


Thank you for your help!
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Mon Dec 13, 2010 4:03 pm     Reply with quote

I don't see the 'internal 16MHz clock. I presume you mean you want a 16MHz CPU clock?.

Looking at the oscillator diagram, you need to use the 8MHz master output from the oscillator block. This has to be selected to feed to the PLL (INTRC_PLL). Then the PLL has to be set to divide this by 2 to give 4MHz (PLL2). You then have to select the PLL output (PLLEN), so you have 48MHz feeding to the USB selector, and LS48MHZ, should then divide this by eight to give the required 6Mhz to the USB.
If you then want a 16MHz CPU clock, you would want CPUDIV3.

Setting these fuses, then compiling, and loading the code with MPLAB, shows the required fuses all set correctly that I can see.

Best Wishes
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