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 CCS Technical Support

Option invalid Wrong pins for H/W

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lukeevanslx



Joined: 11 Jun 2012
Posts: 14

View user's profile Send private message

Option invalid Wrong pins for H/W
PostPosted: Sun Feb 10, 2013 8:52 pm     Reply with quote

Hi
I have this code:
#use i2c(Master,Fast,sda=PIN_C7,scl=PIN_C6,force_hw,stream=ACCEL)
which compiled properly under 4.112, but gives the error:
"Option invalid Wrong pins for H/W" under version 4.140.
The part I am using is: PIC18F46K20, which has I2C on these pins.
Please advise.
jeremiah



Joined: 20 Jul 2010
Posts: 1346

View user's profile Send private message

PostPosted: Sun Feb 10, 2013 9:15 pm     Reply with quote

Just a quick glance at the data sheet shows the I2C lines on C3 and C4, not C6 and C7.

My guess is the earlier compiler went ahead and did a software I2C even though you specified HW and the newest version now generates an error instead. If anything, I feel like the 4.140 way is preferable. I like that it generates an error if you specify force_hw and try to use non-hardware pins.
lukeevanslx



Joined: 11 Jun 2012
Posts: 14

View user's profile Send private message

PostPosted: Sun Feb 10, 2013 9:24 pm     Reply with quote

Ah, thanks.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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