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

RS232 communication PIC18f4550 -- putc sending corrupt data
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Fri Sep 10, 2010 10:09 am     Reply with quote

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

View user's profile Send private message

Default Fuses
PostPosted: Fri Sep 10, 2010 10:30 am     Reply with quote

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

View user's profile Send private message

Re: Default Fuses
PostPosted: Fri Sep 10, 2010 10:34 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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