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

pic i2c slave is "not found"
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
Ttelmah



Joined: 11 Mar 2010
Posts: 19222

View user's profile Send private message

PostPosted: Wed Nov 10, 2021 6:25 am     Reply with quote

It is interesting. If you build with the old compiler (don't have this one, but
one quite close), it uses the same access maths when using a temporary
variable. I was hoping this would change.
webgiorgio



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

PostPosted: Wed Nov 10, 2021 8:57 am     Reply with quote

CCS support gave me the solution Very Happy

Quote:

The issue is that version 5.034 is incorrectly setting the SDISEL bit in the APFCON1 register, and that is causing it not to work. This issue was fixed in newer versions of the compiler. You can work around it in your version by creating a variable mapped to the location of the SDISEL bit as follows:

#bit SDISEL = getenv("SFR:APFCON1").3

Then setting SDISEL to 0 at the beginning of main() as follows:

SDISEL = 0;
Ttelmah



Joined: 11 Mar 2010
Posts: 19222

View user's profile Send private message

PostPosted: Wed Nov 10, 2021 11:03 am     Reply with quote

That's interesting. PCM's code from 5.034, doesn't seem to have this
bit set.
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