View previous topic :: View next topic |
Author |
Message |
lukeevanslx
Joined: 11 Jun 2012 Posts: 14
|
Option invalid Wrong pins for H/W |
Posted: Sun Feb 10, 2013 8:52 pm |
|
|
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
|
|
Posted: Sun Feb 10, 2013 9:15 pm |
|
|
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
|
|
Posted: Sun Feb 10, 2013 9:24 pm |
|
|
Ah, thanks. |
|
|
|