Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MPLAB 7.21 bug ??

Status
Not open for further replies.

akg

New Member
hello

i was tring simulate some code in the new mplab,but i was stuck in a probelm


Code:
org 0
goto start

org 4
movwf  w_temp
...
...
retfie

start
     bsf  INTCON,GIE
..
..
..

when simulating this it went as normal..
but after having a memory and processor reset .. , when steppinf tru the code from beginig. instead of jumping to the "start" , after goto start , the simulator went directly into the org 4 and movwf w_temp , and stepped tru the retfie and on to the start.. . Once this behaviour starts it continues like that, and i feel it occures at random times.only way to resume the normal behaviour is to restart mplab..

y this is caused , am i missing something ??
thanks in advance
Akg
 
as i said "only way to resume the normal behaviour is to restart mplab.. " ..ie the correct behaviour will return after restarting mplab..and no manipulation was done as u said ..afterall i have noted this phenomenon on the example skeleton code by mplab :( .

Thanks for the replay
akg
 
Oh, I get it. You are probably using Clear Memory->All Memory, right?

What that does is blank the simulator's program memory. It's just like erasing a PIC. When you later step through your code, the MPLAB editor makes you think you are actually stepping through your code, when in fact, it's just executing blank (0x3FFF ADDLW 0xFF) instructions.

If what I'm saying is not clear, before stepping through your code, go to View->Program Memory, and use that view to step through your code. You'll see what you're doing wrong.

Conclusion : don't use Clear Memory->All Memory.

Clear Memory->GPRs might be what you're looking for. ;) Or if you prefer Clear Memory->All Memory to wipe both GPRs and EEPROM in one go, you'll then have to hit Make (F10) to refresh the program memory with your code.
 
ohh..thank u for pointing me the error..

now the next one :)

pls see the marked parts in the attached , this is on 84a

the temp register is mapped to 0x0f , but the register window shows _CP_ON
also u can see that the values actualy incremented , during execution ..now y display shows error ?

thanks
akg
 

Attachments

  • mplab_bug.jpg
    mplab_bug.jpg
    49.8 KB · Views: 364
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top