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

Help with FUSES for crystal on 18F14K50

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



Joined: 14 Oct 2010
Posts: 2

View user's profile Send private message

Help with FUSES for crystal on 18F14K50
PostPosted: Thu Oct 14, 2010 2:13 pm     Reply with quote

Hello everyone, I am having a hard time trying to get my usb interface to work with this pic, I'm used to work with 18F2550 which I can modify .hex fuses bit with winpic800 and set crystal speed before programming. I have tried with 8MHZ and 20MHZ crystal but I can't see how must I set my fuses on source, actually they are:
Code:

#include <18F14K50.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP,NODEBUG,NOBROWNOUT,USBDIV1,PLLEN,CPUDIV1,PUT,MCLR
#use delay(clock=48000000)

My circuit is implemented like this:
http://img219.imageshack.us/i/14k50.png/

This same implementation works on my 18F2550 one (different pins of course) but on 14K50 it isn't.

Could someone take a look at this and give a hand?
Thanks in advance.
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Thu Oct 14, 2010 3:13 pm     Reply with quote

Unlike the 18F2550, which has multiple possible USB dividers, followed by the *24 PLL, to give 96MHz for the USB, the 18F14K50, _only_ has one *4 PLL, and requires 48MHz at the USB circuitry for full speed operation, or 6, or 12MHz for low speed operation. The _only_ crystal frequencies supported for USB operation with this chip, are 6MHz, and 12Mhz (or 48MHz with an external clock), and 6MHz, is not supported for full speed operation.
For full speed, you need to change to a 12Mhz crystal. There is no 'USBDIV' setting for full speed, you would just use PLLEN (to give 48MHz), and CPUDIV1, so that the CPU itself runs at 48MHz as well as the USB.
With a 12MHz crystal, your fuses should then work.

Best Wishes
mad3d



Joined: 14 Oct 2010
Posts: 2

View user's profile Send private message

PostPosted: Thu Oct 14, 2010 3:52 pm     Reply with quote

Thanks a lot for your help!!!

So basically switch to a 12Mhz crystal and use this fuse settings:

#include <18F14K50.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP,NODEBUG,NOBROWNOUT,PLLEN,CPUDIV1,PUT,MCLR
#use delay(clock=48000000)
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Fri Oct 15, 2010 3:53 am     Reply with quote

Yes. Smile

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