Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Mplab error -CORE-W0016: Halted due to PC incrementing over the Maximum PC address

Status
Not open for further replies.

eng_rania

Newbie level 3
Joined
Aug 8, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Cairo, Egypt
Activity points
1,309
I use MPLAB IDE V8.30 ( Debugger: MPLAB SIM, Compiler: PICC-18_pro_9.61 ),
I write a small program (for PIC18F4420) just turn on/off leds while using a simple delay function, it compiles fine with Build Succeeded, but the following error occurred when I tried to debug the program " CORE-W0016: Halted due to PC incrementing over the Maximum PC address and wrapping back to Zero " I don't know if there is certain setting causes this problem, Any help will be highly appreciated.
 

out of scope mplab

Los Frijoles said:
It is always helpful if we can see your program :D.

thank you for your concern,
note that
**i have a problem in tracing the updated values of the int i & j as it appears "out of scope" in the watch window,
** by viewing the program memory, i found that an instruction of goto-- is performed although it is not included in the code, it causes the unexpected jump to a far place in the program memory?????

this is the program:
#include <htc.h>

void Delay2Sec (void);

void main (void)
{
__CONFIG(1, HSPLL);
SBOREN = 0; //deactivate power out reset
TRISA = 0x00; //assign RAs as output pins, for testing leds
//(osc pins read as 0's)
TRISE = 0x00; //assign REs as output pins, for testing leds
TRISC = 0x00; //assign RCs as output pins, for testing leds
ADCON1 = 0x0F; //all channels digital
PORTA = 0x00;
PORTE = 0x00;
PORTC = 0x00;

while (1) {
Delay2Sec ();
RA1 = 1;
RA2 = 1;
Delay2Sec ();
RA3 = 1;
RA4 = 1;
Delay2Sec ();
RA5 = 1;
RE0 = 1;
Delay2Sec ();
RE1 = 1;
RE2 = 1;
Delay2Sec ();
RC0 = 1;
RC1 = 1;
Delay2Sec ();
RA1 = 0;
RA2 = 0;
Delay2Sec ();
RA3 = 0;
RA4 = 0;
Delay2Sec ();
RA5 = 0;
RE0 = 0;
Delay2Sec ();
RE1 = 0;
RE2 = 0;
Delay2Sec ();
RC0 = 0;
RC1 = 0;
}
}

void Delay2Sec (void) //delay about 0.5 sec for (10 MHz crystal, HSPLL mode)
{
//locals
unsigned int i = 0;
unsigned int j = 0;

for (i=0; i<10; i++)
for (j=0; j<670; j++);
}
 

mplab ide watch out of scope

Los Frijoles said:
It is always helpful if we can see your program :D.

thank you for your concern,
note that
**i have a problem in tracing the updated values of the int i & j as it appears "out of scope" in the watch window,
** by viewing the program memory, i found that an instruction of goto-- is performed although it is not included in the code, it causes the unexpected jump to a far place in the program memory?????

this is the program:
#include <htc.h>

void Delay2Sec (void);

void main (void)
{
__CONFIG(1, HSPLL);
SBOREN = 0; //deactivate power out reset
TRISA = 0x00; //assign RAs as output pins, for testing leds
//(osc pins read as 0's)
TRISE = 0x00; //assign REs as output pins, for testing leds
TRISC = 0x00; //assign RCs as output pins, for testing leds
ADCON1 = 0x0F; //all channels digital
PORTA = 0x00;
PORTE = 0x00;
PORTC = 0x00;

while (1) {
Delay2Sec ();
RA1 = 1;
RA2 = 1;
Delay2Sec ();
RA3 = 1;
RA4 = 1;
Delay2Sec ();
RA5 = 1;
RE0 = 1;
Delay2Sec ();
RE1 = 1;
RE2 = 1;
Delay2Sec ();
RC0 = 1;
RC1 = 1;
Delay2Sec ();
RA1 = 0;
RA2 = 0;
Delay2Sec ();
RA3 = 0;
RA4 = 0;
Delay2Sec ();
RA5 = 0;
RE0 = 0;
Delay2Sec ();
RE1 = 0;
RE2 = 0;
Delay2Sec ();
RC0 = 0;
RC1 = 0;
}
}

void Delay2Sec (void) //delay about 0.5 sec for (10 MHz crystal, HSPLL mode)
{
//locals
unsigned int i = 0;
unsigned int j = 0;

for (i=0; i<10; i++)
for (j=0; j<670; j++);
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top