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

Adafruit MCP23017 i2c library with Arduino Due (IDE 1.5.2)

Postby Dewy » Sat Mar 09, 2013 11:11 am

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
Dewy
 
Posts: 5
Joined: Sun Feb 19, 2012 11:38 pm
Location: Chicago,IL,USA

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

Postby adafruit_support_rick » Sat Mar 09, 2013 3:28 pm

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
adafruit_support_rick
 
Posts: 3158
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

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

Postby Dewy » Sun Mar 10, 2013 1:49 am

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
Dewy
 
Posts: 5
Joined: Sun Feb 19, 2012 11:38 pm
Location: Chicago,IL,USA

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

Postby adafruit_support_rick » Sun Mar 10, 2013 12:06 pm

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
adafruit_support_rick
 
Posts: 3158
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

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

Postby Dewy » Fri Mar 15, 2013 2:27 am

Thanks! I shall *surly-forth...

*surly = bikers only do one thing with a 'Sally'. >;)
User avatar
Dewy
 
Posts: 5
Joined: Sun Feb 19, 2012 11:38 pm
Location: Chicago,IL,USA

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

Postby adafruit_support_rick » Fri Mar 15, 2013 10:53 am

Odd. The bike in your avatar doesn't look like a Surly... :wink:
User avatar
adafruit_support_rick
 
Posts: 3158
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY


Return to Other Arduino products from Adafruit

Who is online

Users browsing this forum: No registered users and 5 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [113]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]