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 support@ccsinfo.com

I2C slave issues
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mob1182



Joined: 03 Mar 2016
Posts: 28

View user's profile Send private message

PostPosted: Mon Jan 16, 2017 3:31 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jan 17, 2017 6:11 pm     Reply with quote

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: 19260

View user's profile Send private message

PostPosted: Wed Jan 18, 2017 2:02 am     Reply with quote

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?.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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