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

PIC16F648A configuration problem

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



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PIC16F648A configuration problem
PostPosted: Tue Mar 29, 2016 7:24 pm     Reply with quote

Hi
My compiler is CCS PCM C Compiler, Version 3.249
I have the configuration set using CCS wizard and my additions as below:

Code:
#FUSES WDT                 
//***************FUSES for 8MHz external clock*********************
#FUSES EC_IO//for external clock                 
#use delay(clock=8000000,RESTART_WDT)//for external clock
//***************FUSES for 4MHz internal RC oscilator**************
//#FUSES INTRC_IO//for internal oscilator
//#use delay(clock=4000000,RESTART_WDT)//for internal oscilator
//*****************************************************************
#FUSES BROWNOUT,MCLR,NOLVP,PUT
//*****************************************************************
//#FUSES PROTECT//for code protection
#FUSES NOPROTECT//no code protection
//*****************************************************************
#FUSES NOCPD//Data EEPROM NOT Code Protected
//#FUSES CPD//Data EEPROM Code Protected
//*****************************************************************
#use rs232(baud=9600,parity=N,xmit=PIN_B2,rcv=PIN_B1,bits=8,restart_wdt)//for external clock
//#use rs232(baud=4800,parity=N,xmit=PIN_B2,rcv=PIN_B1,bits=8,restart_wdt)//for internal oscilator
//*****************************************************************

When opening MPLAB v8.85 > Configure >Configuration Bits...
I am getting some of the bits wrong:
WDTE WDT disabled
BOREN BOD disabled
In C:
Code:
   setup_timer_0(RTCC_EXT_L_TO_H);
   setup_wdt(WDT_144MS);

Testing physically the board with 2.2V, everything functioning so BOD really disabled.
Can somebody tell me what I am doing wrong?

Best wishes
Joe
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 29, 2016 7:53 pm     Reply with quote

You probably have MPLAB vs. 8.85 set for Debug mode. Using Debug
mode will disable some of the fuses. Change it to Release mode and
re-compile. There is a drop-down box at the top of the MPLAB window to do this.
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Tue Mar 29, 2016 8:01 pm     Reply with quote

Thank you very much PCM programmer
It solved the problem, all the fuses are OK now Smile

Best wishes
Joe
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