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

#FUSES [Solved]

 
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

#FUSES [Solved]
PostPosted: Sat Sep 17, 2022 7:17 am     Reply with quote

Hi

PIC12F1822
CCS PCM C Compiler, Version 5.062

My fuses
Code:
#include <12F1822.h>
#device ADC=10
#FUSES PUT                      //Power Up Timer
#FUSES NOWDT               //WDT disabled
#FUSES NOMCLR                     //Master Clear pin disabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPD                    //No EE protection
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES NOCLKOUT                 //I/O function on OSC2
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOFCMEN                  //Fail-safe clock monitor disabled
#FUSES NOWRT                    //Program memory not write protected
#FUSES INTRC_IO               //Internal oscillator
#FUSES PLL                  //PLL enabled
#FUSES STVREN                   //Stack full/underflow will cause reset
#FUSES BORV25                   //Brownout reset at 2.5V
#FUSES NOLVP                    //No low voltage programing, B3(PIC16) or B5(PIC18) used for I/O
#use delay(internal=32MHz)

What I am getting in MPLAB v8.92 Configuration bits 4 x PLL disabled and WDT disabled
Why PLL disabled?

The LST file
Quote:
Configuration Fuses:
Word 1: 0F84 INTRC_IO NOWDT PUT NOMCLR NOPROTECT NOCPD BROWNOUT NOCLKOUT NOIESO NOFCMEN
Word 2: 1AFF NOWRT PLL_SW STVREN BORV25 NODEBUG NOLVP

Why PLL_SW and not PLL?

while making simulation in MPLAB the simulation stops saying that the
....SIM stopped because WDT expired....
But the WDT is disabled

Can somebody explaining me what are the problems?

Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Sat Sep 17, 2022 7:36 am     Reply with quote

Read pragraph 5.2.2.6 in the datasheet.
On quite a few PIC's, when using the PLL with the internal oscillator, this
must be done by enabling the PLL in software or boot will be unreliable.
The compiler knows this and defaults to enabling in software (and will
add the instruction to do this right at the start of the code).
If you want to force it on in hardware, then simply have the clock setup
line before the fuses. This will then leave this bit set in the fuses.
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

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

PostPosted: Sat Sep 17, 2022 9:15 pm     Reply with quote

Thank you very much Ttelmah Smile
Like always your answers are very helpful.
the #use delay before the fuses solved the problem

You have an answer for the WDT in MPLAB simulator?
Usually MPLAB simulator solving me most of the bugs

Best wishes
Joe
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

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

PostPosted: Sat Sep 17, 2022 10:21 pm     Reply with quote

Problem of WDT solved
My mistake Embarassed
disabled the WDT in the fuses but left in the program:

Code:
SETUP_WDT(WDT_64MS);//WDT will reset after 64ms


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