#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
Posted: Sat Sep 17, 2022 7:36 am
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
Posted: Sat Sep 17, 2022 9:15 pm
Thank you very much Ttelmah
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
Posted: Sat Sep 17, 2022 10:21 pm
Problem of WDT solved
My mistake
disabled the WDT in the fuses but left in the program:
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