Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dewy
 
Posts: 12
Joined: Mon Feb 20, 2012 12:38 am

Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Post by dewy »

Just a silly i2c (and Due) noob question.

I'm trying to use the Adafruit MCP23017 library with the Arduino Due (IDE 1.5.2)
Here's the problem, the IDE automatically switches configs/backend between AVR and ARM during board select.

Select the Arduino Mega2560 for example and the library works just fine. (As advertised.) :)

However if you select the Arduino Due as the target device the back-end changes and the library no longer works.

So my noob question question is; can I copy the headers from the AVR toolchain into a sketch sub-folder labeled "avr" and have it work safely?

It does compile this way, but when it got around to calling for the fuse.h file I got concerned, stopped short of uploading it, and clicked by here for some skilled advice.

The library calls for avr/pgmspace.h...
pgmspace.h calls for:
avr/common.h
avr/fuse.h
avr/io.h
avr/lock.h
avr/portpins.h
avr/sfr_defs.h
avr/version.h

Surely, such a mediation is not going to be that simple.

Any advice?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Post by adafruit_support_rick »

The Due is a completely different processor architecture; totally unrelated to the AVR. Our libraries have to be ported before they will work on a Due. This is something that we're working on right now, but it's not necessarily a trivial task and it will take some time. All I can say is that we're trying to get through them all as quickly as we can.

User avatar
dewy
 
Posts: 12
Joined: Mon Feb 20, 2012 12:38 am

Re: Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Post by dewy »

Thank you Driverblock, I was nearly certain that was going to fail.

BTW, dose the ARM actually use fuses? And if so can one be bricked by such misconceptions?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Post by adafruit_support_rick »

Dewy wrote:BTW, dose the ARM actually use fuses? And if so can one be bricked by such misconceptions?
Good question. I just had a squint at the SAM3X datasheet. I didn't see anything that looked like a fuse. They have some "lock regions" in flash, and a "security bit" which can be set to prevent any external access to flash (so nobody can download and hack your executable).

So far, I haven't seen anything that can't be undone. Unsetting the security bit simply requires wiping the flash.

It looks like no bricking is possible, so go ahead - do yer worst! :wink:

User avatar
dewy
 
Posts: 12
Joined: Mon Feb 20, 2012 12:38 am

Re: Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Post by dewy »

Thanks! I shall *surly-forth...

*surly = bikers only do one thing with a 'Sally'. >;)

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Post by adafruit_support_rick »

Odd. The bike in your avatar doesn't look like a Surly... :wink:

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”