Go Down

Topic: What is the readiness status of Code Libraries for the Due? (Read 735 times) previous topic - next topic

turgo

Feb 28, 2013, 09:30 am Last Edit: Feb 28, 2013, 09:37 am by turgo Reason: 1
Can I expect libraries to work on the Due?  I'm mostly looking for an evaluation if they are mature enough to pursue projects on the Due, or should I use a Mega 2560?

Grumpy_Mike

Only some. The underlying processor has very diffrent architecture and many libaries use this to work. So some can never be converted but will have to be rewritten.

turgo

Thanks, Mike.

Do you think that this is a problem that will be solve, or is the nature of open source efforts such that there will always be libraries now that won't work on the Due?

Grumpy_Mike

As most libaries are written by third parties the I suspect there will never be a Due version of some. Also it is impossible to make a Due version of others that use aspects of the hardware hat does not exist on the Due.
If there is anything specific you want the either write it yourself or put out a call for an update here.

AndyL

I see it as a case that if someone has a need for using a specific library on a Due then, if they have the appropriate knowledge and skills, should be able to make the changes themselves. However saying this, it is also dependant on the actual library and how much of the processor features and registers it uses directly. Anything that uses regular Arduino type calls could be Ok with minimum changes, others using SPI, direct port writes, processor specific registers would be more difficult.  other things to consider is that if a particular shield uses SPI then it may be dependant on the SPI pins being on I/O pins 11, 12 and 13.

Other things to consider are changing from using softserial to hardware serial on Due, changing references to PROGMEM and implementing alternatives to EEPROM storage.

For my own personal pleasure I've done a couple, one for Wiznet 820io modules and another currently being worked on for the Roving networks RN-XV WiFi module based on the WiFlyHQ library. I have a number of other libraries that I had created or updated for Arduino and I'd get round to updating these some time but the complexity with these is that they use direct port writes, but nothing I shouldnt be able to fix!

Hope this helps

Andy



Go Up