View previous topic :: View next topic |
Author |
Message |
mob1182
Joined: 03 Mar 2016 Posts: 28
|
|
Posted: Mon Jan 16, 2017 3:31 pm |
|
|
Ah ok I see that. So bear with me, I'm trying to learn assembly but lets take the setting of the flag for example... looking at the opcode for MOVWF on line 000CE (6F60 in my latest post), it looks like its saying to use the BSR and not the access bank. Because last bit of 6F is 1 right.
So would this mean that it hasn't set the correct BSR? Address 60 should be bank 0.
Where is it setting the BSR? Is this only done with a MOVLB(I see this after the MOVWF but not before it)?
Shouldn't the BSR be set in the interrupt since who knows what it'll be set to when an interrupt occurs? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jan 17, 2017 6:11 pm |
|
|
It's possible to view a "Disassembly Listing" of your compiled program
which lists if a memory access is "BANKED" or "ACCESS". This should
help you to analyze the problem.
In MPLAB 8.92, you just go to View / Disassembly Listing.
In MPLAB X, it's more complicated. Go to the menus listed below:
1. Go to File / Project Properties. The properties window will pop up.
2. In that window, go to Conf: Loading. There will be a tickbox on the
right that says: "Load symbols when programming or building for
production (slows process)."
Make sure that tickbox is enabled. Then click "Apply" and "OK" to exit.
3. Then go to Window / Output / Disassembly Listing File.
A disassembly window will pop up. Then you should see the listing with
BANKED or ACCESS for each memory instruction. Anytime you compile,
this window will be updated. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19612
|
|
Posted: Wed Jan 18, 2017 2:02 am |
|
|
Looking at your fuses, you don't have NOXINST selected. This is _required_ by CCS code. One thing that the XINST fuse changes, is how access RAM is selected.
This may be the problem....
As an update to this. The compiler looks to be defaulting to setting NOXINST (on 5.066), so it should be OK if the fuses are being written. Though you talk about having tried two different programmers, are you sure you have the option to program the configuration selected?. |
|
|
|