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

Problems with fuses

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



Joined: 02 May 2008
Posts: 2

View user's profile Send private message

Problems with fuses
PostPosted: Fri May 02, 2008 5:37 am     Reply with quote

Hello,
I've got an issue regarding fuses. Simple created new project using pcwhd 4.068 (i guess this issue was in earlier versions), then i've changed NOWDT to WDT and NOPUT to PUT, but there nothing has changed in lst file (and inside flashed pic configuration words as well). Source:

#include <18F6722.h>
#device ICD=TRUE
#device adc=8
#use delay(clock=16000000)

#FUSES WDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES HS //High speed Osc (> 4mhz)
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV25 //Brownout reset at 2.5V
#FUSES PUT //No Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NOPROTECT //Code not protected from reading
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOLVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOWRT //Program memory not write protected
#FUSES NOCPB //No Boot Block code protection
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES LPT1OSC //Timer1 configured for low-power operation
#FUSES MCLR //Master Clear pin enabled
#FUSES XINST //Extended set extension and Indexed Addressing mode enabled
#FUSES BBSIZ1K //1K words Boot Block size

#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)


End of generated lst file:

Configuration Fuses:
Word 1: C200 HS IESO FCMEN
Word 2: 0E19 NOBROWNOUT WDT128 NOWDT BORV25 NOPUT
Word 3: 85F3 CCP2C1 LPT1OSC MCLR
Word 4: 0000 NOSTVREN DEBUG NOLVP NOXINST BBSIZ1K RESERVED
Word 5: C0FF NOPROTECT NOCPD NOCPB
Word 6: E0FF NOWRT NOWRTD NOWRTC NOWRTB
Word 7: 40FF NOEBTRB NOEBTR

Data from hex file:
:02000004 0030 CA
:0E000000 00C2 190E F385 0000 FFC0 FFE0 FF40 B4

so @300000 we have exactly same fuses:
C200 0E19 85F3 0080 C0FF E0FF 40FF - 7 config words, they were read by ICD interface program (why 0080 instead of 0000 in hex - the second question).
But as fact NOPUT and NOBROWNOUT and NOWDT were compiled instead of having them PUT BROWNOUT WDT... Shocked

can anybody help me with solving this issue?

Thanks in advance!


PS: - i've got it - these fuses were marked as Force fuses for ICD debugging usage (when compiled with ICD=TRUE). When there is no ICD=TRUE, all fuses become ok.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri May 02, 2008 7:31 am     Reply with quote

You already figured out it has to do with the ICD=TRUE setting.
Code:
#FUSES XINST //Extended set extension and Indexed Addressing mode enabled
Set this to NOXINST. The wizard is a bit optimistic here as the compiler does not yet support the Extended Instructions and enabling these might cause erratic program behaviour.
xsnake



Joined: 02 May 2008
Posts: 2

View user's profile Send private message

PostPosted: Fri May 02, 2008 8:42 am     Reply with quote

yep, thanks
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