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

FUSES changing

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



Joined: 04 Oct 2006
Posts: 53
Location: Berkshire, England

View user's profile Send private message

FUSES changing
PostPosted: Fri Feb 09, 2007 9:11 am     Reply with quote

PCM 3.249, 16F88

I have the following configurations in my header:

Code:


#define USE_ICD


// Device selection and configuration
#include <16F88.h>
#device ADC=10
#device *=16               // Bank switching, for V3 compiler

#ifdef USE_ICD
   #device ICD=TRUE           // Microchip ICD2
#endif

#use delay(clock=4000000)

// Note: Set Oscillator to HS, even though only 4 MHz, due to loading on xtal
#FUSES HS, NOWDT, PROTECT, PUT, BROWNOUT

...


When the code is as above, all the configuration bits are correct

If I comment out the #define USE_ICD line, it changes the configuration bits to the following:

Configuration Fuses:
Word 1: 1FE2 HS NOWDT PUT MCLR BROWNOUT LVP NOCPD NOWRT NODEBUG CCPB0 PROTECT

Am I missing something simple here?

Edit
The same problem occurs if I totally remove all of the lines related to the ICD, so I only have:


Code:



// Device selection and configuration
#include <16F88.h>
#device ADC=10
#device *=16               // Bank switching, for V3 compiler

#use delay(clock=4000000)

// Note: Set Oscillator to HS, even though only 4 MHz, due to loading on xtal
#FUSES HS, NOWDT, PROTECT, PUT, BROWNOUT

...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Feb 09, 2007 1:01 pm     Reply with quote

It's clear that CCS changes some of the Config bits if you add this
statement:
Quote:
#device ICD=TRUE


Look in MPLAB Help File for the ICD2. In the section on
"Resources used by the ICD2 for PIC16F Devices", it says:
Quote:

Low voltage ICSP programming disabled for devices
that support this type of programming.


For code Protect fuse, again look in the MPLAB Help file for the ICD2.
Look in the section titled: "Link: In-Circuit Debug Resources"
Quote:
The in-circuit debugger will not work if "code protect" or
"table read protect" is enabled, if the Watchdog Timer is
running, or if the oscillator is not set to the correct mode
by the configuration bits.


It appears that CCS also disables Brownout. I'm not sure why they
do that.
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