|
|
View previous topic :: View next topic |
Author |
Message |
juandres
Joined: 23 Jun 2011 Posts: 5 Location: Ecuador
|
18f2550,crystal=4mhz,usb=48mhz,cpu=4mhz |
Posted: Thu Jun 23, 2011 11:47 pm |
|
|
The title exposes my problem, I need to work with these characteristics because of my application...
I test a program with these fuses:
Code: |
#include <18F2550.h>
#device adc=8
#fuses PLL1,CPUDIV1,USBDIV,XTPLL,VREGEN,NOWDT,NOPBADEN,NOLVP,NODEBUG,NOPROTECT
#use delay(clock=4000000)
|
and it didn't work.
I browse in Microchip C a fuse called: "XTPLL_XT", I believe with this fuse my program would work... but this fuse isn't implemented in ccs compiler? :(
Would someone help me please? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Fri Jun 24, 2011 2:30 am |
|
|
Change the XTPLL fuse to just XT.
Key to understand is that the PLL is always connected on the x550 chip. XTPLL, says take the _CPU_ clock from the PLL route - with the settings you have, this runs the CPU at 48MHz - Look at the oscillator diagram FIG 2-1 in the data sheet. On this, you see the clock feeding from the crystal directly into the CPUDIV divider, called 'XT, HS, EC, & ECIO'. These correspond to the CCS fuses for this direction, or being fed from the USB PLL, called 'HSPLL, ECPLL, XTPLL, and ECPLL' - you are selecting the latter.
However, unless your USB application is very tightly written, running the CPU at 4MHz, might be a problem, with it being much more likely to give USB faults. If you don't need great accuracy, consider clocking the CPU off the internal RC at 8MHz, or using XTPLL and CPUDIV4 to give 16MHz (remember the CPUDIV numbers are divisions on the 'non PLL' route, and binary pattern 11, gives /4 on the direct route, and /6 from the PLL....).
There is no fuse called XTPLL_XT (for fuses, look at the data sheet), This is a Microchip code for what in the data sheet, is just called 'XT' - CCS use the same nomenclature.
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
|