View previous topic :: View next topic |
Author |
Message |
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Sep 10, 2010 10:09 am |
|
|
You should look at the .LST file.
Check to see how the configuration fuses that you ARE NOT declaring are being set.
I have a feeling you'll be surprised.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
nidhimittalhada
Joined: 06 Sep 2010 Posts: 21
|
Default Fuses |
Posted: Fri Sep 10, 2010 10:30 am |
|
|
YESSSS i saw .LST file
IT automatically adds up this line.
which i guess is creating 48 MHz
#fuses HSPLL, NOWDT, PLL2, CPUDIV2, USBDIV, NOXINST
BUT NOW one other doubt...
On Board 20 MHz Crystal Oscillator.
Supports Up to 48 MHz Operation.
PLL2 says that divide by 2 in case input osc is 8 Mz ----> that converts it to 4 Mz ..
But in my case On Board 20 MHz Crystal Oscillator.
which means to make it 4 MHz ....PLL5 should have been used
as was mentioned in previous message of urs.
please clarify ...why its taking by default 8 MHz .....?? |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
Re: Default Fuses |
Posted: Fri Sep 10, 2010 10:34 am |
|
|
nidhimittalhada wrote: | YESSSS i saw .LST file
IT automatically adds up this line.
which i guess is creating 48 MHz
#fuses HSPLL, NOWDT, PLL2, CPUDIV2, USBDIV, NOXINST
BUT NOW one other doubt...
On Board 20 MHz Crystal Oscillator.
Supports Up to 48 MHz Operation.
PLL2 says that divide by 2 in case input osc is 8 Mz ----> that converts it to 4 Mz ..
But in my case On Board 20 MHz Crystal Oscillator.
which means to make it 4 MHz ....PLL5 should have been used
as was mentioned in previous message of urs.
please clarify ...why its taking by default 8 MHz .....?? |
Since you didn't specify the frequency of the crystal it had to guess...
the fact that your project works is just luck.
So let's just set it correctly...
You can use #fuses or you can declare:
#use delay (clock=48M, crystal=20M)
I always check when I use the simple method since I'm just paranoid that way.
Now compile and check your .LST file.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
|