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

Pic24HJ256GP610 Oscillator Fuses

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



Joined: 16 Jan 2011
Posts: 27

View user's profile Send private message

Pic24HJ256GP610 Oscillator Fuses
PostPosted: Fri Jan 21, 2011 2:21 pm     Reply with quote

If you can help, with the following, it will be highly appreciated
I set up the fuses correctly but MPLab shows the fuses are different.

It shows Primary Osc = disabled (wrong)
primary clock = FRC (wrong)
but PLL shows enabled (correct)

My fuses are:

Code:
#FUSES WDT                         //Watch Dog Timer
#FUSES NOWRTB                   //Boot block not write protected
#FUSES NOBSS                     //No boot segment
#FUSES NOPROTECT             //Code not protected from reading
#FUSES NOWRT                    //Program memory not write protected
#FUSES XT
#FUSES PR_PLL                     //Pimary oscillator
#FUSES NOOSCIO                 //OSC2 is general purpose output
#FUSES WPRES128                //Watch Dog Timer PreScalar 1:128
#FUSES WPOSTS16               //Watch Dog Timer PostScalar 1:32768
#FUSES PUT128                   //Power On Reset Timer value 128ms
#FUSES NOIESO                   //Internal External Switch Over mode #FUSES NORSS                    //No secure segment RAM
#FUSES NOSSS                    //No secure segment
#FUSES NOWRTSS                //Secure segment not write protected
#FUSES NORBS                    //No Boot RAM defined
#FUSES NODEBUG                //No Debug mode for ICD
#FUSES NOJTAG                   //JTAG disabled

etc.

Code:
#use delay(clock=40M, Oscillator=10M,RESTART_WDT)


The micro runs at 5 times lower speed to what is programmed
On a few other but different Pic24 microcontrollers it works correct.
Any ideas?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Jan 21, 2011 4:29 pm     Reply with quote

I couldn't reproduce what you said about different fuse bits in MPLAB, so apparently your using a different PCD version,
or something else is different. Obviously it's useless to check the other points then.

I may want to look into it further, if you
-tell the involved PCD version
-post a complete compilable example that reproduces the issue
pieter



Joined: 16 Jan 2011
Posts: 27

View user's profile Send private message

PostPosted: Sat Jan 22, 2011 1:22 am     Reply with quote

Thank you for helping
I am using Pcd 4.107
Printf == >= ! functions and expressions do not work correctly either
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sat Jan 22, 2011 3:40 am     Reply with quote

PCD V4.107 doesn't set the PLL parameters for your chip according to #use delay, newer versions (e.g. V4.112) do.
I can't see a problem with #fuses in V4.107, however.

Setup_oscillator() also doesn't work correctly with V4.107, so you have to write to CLKDIV and PLLFBD directly.

Some other bugs (e.g. arithmetic) are also present with V4.107. I'll check V4.118 next days.
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