View previous topic :: View next topic |
Author |
Message |
BlueTower
Joined: 23 Oct 2008 Posts: 29
|
Configuration bits setup |
Posted: Sun Nov 30, 2008 12:22 pm |
|
|
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
|
|
Posted: Sun Nov 30, 2008 1:34 pm |
|
|
Post your compiler version. |
|
|
BlueTower
Joined: 23 Oct 2008 Posts: 29
|
|
Posted: Sun Nov 30, 2008 2:00 pm |
|
|
4.3.0.257 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Nov 30, 2008 2:03 pm |
|
|
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
|
|
Posted: Sun Nov 30, 2008 2:16 pm |
|
|
Version 4.077 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Nov 30, 2008 2:24 pm |
|
|
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
|
|
Posted: Sun Nov 30, 2008 2:32 pm |
|
|
MPLAB IDE version 8.14.00.00 |
|
|
BlueTower
Joined: 23 Oct 2008 Posts: 29
|
|
Posted: Sun Nov 30, 2008 2:47 pm |
|
|
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! |
|
|
|