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 support@ccsinfo.com

problem with config oscillator on pic18f25k80

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



Joined: 11 May 2009
Posts: 22

View user's profile Send private message

problem with config oscillator on pic18f25k80
PostPosted: Tue Apr 19, 2011 3:25 am     Reply with quote

Hi, I'm tryng to use the PIC18f25k80 with the internal oscillator (HF-INTOSC 16MHz) and the PLL enabled for work at 64MHz.
this is my code:
Code:
#include <18F25K80.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES WDT128                   //Watch Dog Timer uses 1:128 Postscale
#FUSES VREGSLEEP             
#FUSES INTRC_HP             
//#FUSES SOSC_HIGH             
#FUSES NOXINST                  //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES PLLEN                 
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOBROWNOUT               //No brownout reset
#FUSES BORV18               
#FUSES ZPBORM               
#FUSES WDT_NOSLEEP           
#FUSES WDT1048576                           
#FUSES MSSPMSK7             
#FUSES NOMCLR                   //Master Clear pin used for I/O
#FUSES STVREN                   //Stack full/underflow will cause reset
#FUSES BBSIZ2K                  //2K words Boot Block size
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPB                    //No Boot Block code protection
#FUSES NOCPD                    //No EE protection
#FUSES NOWRT                    //Program memory not write protected
#FUSES NOWRTC                   //configuration not registers write protected
#FUSES NOWRTB                   //Boot block not write protected
#FUSES NOWRTD                   //Data EEPROM not write protected
#FUSES NOEBTR                   //Memory not protected from table reads
//#FUSES NOPMPEMB //PMP Pins are not on the external memory bus
#use delay (clock=64M)

when I compile I get an error on the #use delay(). The error says:"Option invalid Internal oscillator frequency wrong.

Anybody can help me?
Thank you for the reply
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 19, 2011 12:33 pm     Reply with quote

You have multiple oscillator fuses. You should only have one.
Quote:
#include <18F25K80.h>

#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES VREGSLEEP
#FUSES INTRC_HP
//#FUSES SOSC_HIGH
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES PLLEN
#FUSES FCMEN

#FUSES WDT128
#FUSES WDT1048576


You also have multiple Watchdog fuses.

Here is a recent thread on oscillator setup problems with the "K80" family
of PICs. This thread may, or may not help:
http://www.ccsinfo.com/forum/viewtopic.php?t=45164

If you need more help, post your compiler version. We don't remember
your version from previous threads.
blo



Joined: 11 May 2009
Posts: 22

View user's profile Send private message

PostPosted: Tue Apr 19, 2011 1:06 pm     Reply with quote

thank you for the reply. Tomorrow I will try to fix the problem.
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