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

Configuration bits setup

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



Joined: 23 Oct 2008
Posts: 29

View user's profile Send private message

Configuration bits setup
PostPosted: Sun Nov 30, 2008 12:22 pm     Reply with quote

Hi everyone. I am using the PIC18F65j90 and I want to select the INTOSC Internal Fast RC (8 MHz) oscillator mode. My configuration bits are set as seen below:
Quote:

// PIC config register setup
//#pragma config DEBUG = ON, XINST = OFF, STVREN = ON, WDTEN = OFF
#FUSES DEBUG //Debug mode for use with ICD
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NOWDT //No Watch Dog Timer

//#pragma config CP0 = OFF
#FUSES NOPROTECT //Code not protected from reading

//#pragma config IESO = OFF, FCMEN = OFF, FOSC2 = OFF, FOSC = HS
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#FUSES INTRC //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)

//#pragma config WDTPS = 1, CCP2MX = DEFAULT
#FUSES WDT1 //Watch Dog Timer uses 1:1 Postscale

//#FUSES PRIMARY //Primary clock is system clock when scs=00
#FUSES RESERVED //Used to set the reserved FUSE bits


This configuration is seen by MPLAB as INTOSC EC+PLL with FOSC2:FOSC0 = 03 but what I want is just the INTOSC HS mode with FOSC2:FOSC0 = 00. How do I set that up?

Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 1:34 pm     Reply with quote

Post your compiler version.
BlueTower



Joined: 23 Oct 2008
Posts: 29

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 2:00 pm     Reply with quote

4.3.0.257
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 2:03 pm     Reply with quote

That's not the version.
Version numbers are in this format: x.xxx
http://www.ccsinfo.com/devices.php?page=versioninfo

You can find it at the top of the .LST file. The .LST file will be generated
after you successfully compile a program. It's in the project directory.
BlueTower



Joined: 23 Oct 2008
Posts: 29

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 2:16 pm     Reply with quote

Version 4.077
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 2:24 pm     Reply with quote

Also, what's your MPLAB version ?
You can find it in the Help/About MPLAB IDE menu in MPLAB.
BlueTower



Joined: 23 Oct 2008
Posts: 29

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 2:32 pm     Reply with quote

MPLAB IDE version 8.14.00.00
BlueTower



Joined: 23 Oct 2008
Posts: 29

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 2:47 pm     Reply with quote

I found correct configuration:
Quote:

// PIC config register setup
//#pragma config DEBUG = ON, XINST = OFF, STVREN = ON, WDTEN = OFF
#FUSES DEBUG //Debug mode for use with ICD
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NOWDT //No Watch Dog Timer

//#pragma config CP0 = OFF
#FUSES NOPROTECT //Code not protected from reading

//#pragma config IESO = OFF, FCMEN = OFF, FOSC2 = OFF, FOSC = HS
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#FUSES INTRC //Internal RC Osc

//#pragma config WDTPS = 1, CCP2MX = DEFAULT
#FUSES WDT1 //Watch Dog Timer uses 1:1 Postscale

//#FUSES PRIMARY //Primary clock is system clock when scs=00
#FUSES RESERVED //Used to set the reserved FUSE bits


Thanks anyway! Very Happy
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