|
|
View previous topic :: View next topic |
Author |
Message |
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
|
FUSES changing |
Posted: Fri Feb 09, 2007 9:11 am |
|
|
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
|
|
Posted: Fri Feb 09, 2007 1:01 pm |
|
|
It's clear that CCS changes some of the Config bits if you add this
statement:
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. |
|
|
|
|
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
|