|
|
View previous topic :: View next topic |
Author |
Message |
mad3d
Joined: 14 Oct 2010 Posts: 2
|
Help with FUSES for crystal on 18F14K50 |
Posted: Thu Oct 14, 2010 2:13 pm |
|
|
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: 19538
|
|
Posted: Thu Oct 14, 2010 3:13 pm |
|
|
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
|
|
Posted: Thu Oct 14, 2010 3:52 pm |
|
|
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: 19538
|
|
Posted: Fri Oct 15, 2010 3:53 am |
|
|
Yes.
Best Wishes |
|
|
|
|
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
|