Arduino Forum

General Category => General Discussion => Topic started by: giants_fan3 on Sep 30, 2012, 08:55 pm

Title: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Sep 30, 2012, 08:55 pm
So, from Massimo's presentation at Maker Faire this weekend, the word is out that the Arduino Due is to finally be released on the 22nd of October for US $49. The board will run @ 84 Mhz based on Atmel's ARM-Cortex M3-processor based MCU (32-bit) SAM3X8E. In addition, it appears Uno/Mega shields will be compatible with the Due too because the form factor has been maintained.

That's pretty exciting for me as it is, especially given that some intensive applications (e.g. real-time camera imaging/recognition) can become convenient now.

But my question is: What about compatibility of libraries/code? -- will they mostly transition seamlessly too? If not, then for any of the enormous number of existing libraries and code to be ported to the new ARM 32-bit MCU of the Arduino Due, what kinds of things will users/library-creators need to do on the software side?

Since I have no experience with ARM microcontrollers or the architectural differences, I am wondering what factors might be involved.

By the way, here is the one-hour video of the Maker Faire presentation by Massimo Banzi & Alf-Egil Bogen:
http://www.youtube.com/watch?v=4TZQt9lTAOU
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: sdturner on Oct 01, 2012, 10:33 pm
I think it's a safe bet all of the "Arduino" commands (http://arduino.cc/en/Reference/HomePage (http://arduino.cc/en/Reference/HomePage)) will be supported; they will just run a lot faster. However, just as with the existing boards, Arduino functionality can be enhanced or improved by using low level programming and direct register read/write.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 01, 2012, 11:57 pm
Quote
from the SAM3U series

It was the 3U at first then they changed to the 3X. Do you know this for sure?

The "core" Arduino library functions should all work, I ported them to an LPC in a few days so they will be able to do similar.

No direct hardware manipulation will work, so any current programs and libs that do that won't run.

I suspect that many existing libraries will break if they deal with hardware.

Many shields will not work as well because the ARM is a 3v3 system. But many should because 3v3 is usually over the logic high threshold for a 5v system so Arduino outputs should drive the shield but 5v shield outputs will give the ARM a hernia.

The ARM being used has so many more features it will be a shame to ham string it by making the Due conform directly to the current header pinout which according to the photos is what they have done. I guess we just have to wait and see.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: westfw on Oct 02, 2012, 12:28 am
Many libraries will not work on Due without some effort being expended...  The amount of effort required will depend on how dependent the library is on features specific to the AVR, and how well the original author did as making the library "portable."

All those Nth party libraries, written and abandoned by their authors, that broke when 1.0 came out and still haven't been fixed?
They probably won't work on Due, either!  That shouldn't be surprising.

If you're interested in a particular library, you can probably start asking about it now.  Note that not all library authors will have been involved in the Due Beta program, so some of them won't even have tried it yet.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 02, 2012, 04:07 am
So does the arm chip used in the new Due use hardware floating point math? Seems like some ARM chips have that functionality.

Lefty
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: MichaelMeissner on Oct 02, 2012, 07:27 am

So does the arm chip used in the new Due use hardware floating point math? Seems like some ARM chips have that functionality.

Lefty

I believe people have said the Duo uses an ARM Cortex  M3 chip.  According to the spec sheets, that chip does not support floating point.  The Cortex M4F chip has floating point (but not the Cortex M4 that was used for example in the Teeny).
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 02, 2012, 09:06 am
True, at last count they were using the SAM3X8E, it doesn't have FP.

_____
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 02, 2012, 03:38 pm
@Graynomad: My mistake actually. For some reason, I thought the SAM3X8E was part of the SAM3U "series". the 144-pin, 84 Mhz-capable SAM3X8E is correct.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: DuaneB on Oct 02, 2012, 03:47 pm
Reading the datasheet, its very hard going compared to AVR

Duane B

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 02, 2012, 03:58 pm
Here is the one-hour video of the Maker Faire presentation by Massimo Banzi and Alf-Egil Bogen:

http://www.youtube.com/watch?v=4TZQt9lTAOU
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 02, 2012, 04:00 pm
Yes all these chips are pretty complicated. 1465 pages for the SAM and 448 for the Mega328. Most of the stuff you are used to like UARTs etc aren't that much more complicated, but then you have the PLL, NVIC, DMAC etc etc on top. Truth is 98% of people don't need them so at the end of the day it's not as bad as it could be.

If you have a proper framework this stuff is either disabled or setup well enough to get started. There are gotchas though, on the LPCs the GPIO ports don't work until you enable their clock, I spent some time wondering why my writes had no affect. Same goes with the  other peripherals.

Presumably this sort of thing will not bother any Due users.

_____
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 02, 2012, 04:56 pm
It appears the Due provides two USB ports, with one usable for USB host, so e.g., for Android-Arduino communication via Google's ADK... This should be interesting.

How feasible will it be to run a Linux distribution on a 32-bit processor like the Due's SAM3X8E? I'm guessing memory might be a problem, but perhaps there are solutions for that?
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 02, 2012, 05:05 pm
With no extra memory I'd say no chance. You should be able to add 16gigMb of external memory but truth is I don't think that's something worth doing anyway on the Due, there are plenty of boards around now that handle Linux and I don't think we need another one. The Due should be good for real real time stuff and hobbling it with an OS defeats the purpose IMO.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 02, 2012, 05:35 pm
@Graynomad:

RPi for example already provides a straightforwad solution for Linux, but I was asking just to know better.

By the way, when you mentioned 16gig, what is that figure arrived at based on, and what type of memory?
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: westfw on Oct 02, 2012, 05:48 pm
Quote
You should be able to add 16gig of external memory

Huh?  I don't recall CM3 being able to deal with more than 32bits of address space.  Wouldn't that would require an MMU, which CM3 doesn't have?
Also, the datasheet says in it's "external memory interface" chapter: "up to 16MB per chip select" and "up to 8 chip selects."

It'd be close, though.  The ChipKit MAX32 runs a version of BSD unix, and it's only got 128k of RAM.  The SAM3X has "up to 100k"
(the retroBSD that runs on MAX32 may be pretty far away from what people expect when they ask about linux, though...)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 02, 2012, 05:55 pm
The chip has

Static Memory Controller (SMC) for SRAM, NOR, NAND support.
NAND Flash controller with 4-kbyte RAM buffer and ECC
SDRAM Controller

So just about any type of memory you like.

As for the size, oops I should have said 16Mb as there are 24 external address lines. But there are also 4 chip selects so that's a total of 64Mb.

That's for SRAM, there are extra signals for NAND (Address Latch Enable) so that may be able to address more but I haven't looked into that. 

EDIT: westfw, yes it says "up to 8 chip selects" but I can't see them on the SMC block diagram, it only shows NCS[3:0].

ANOTHER EDIT: It does show NCS[0:7] in Fig 24-1 and table 24-1, so I guess they are there somewhere. That would make a total of 128Mb.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: io53 on Oct 02, 2012, 08:50 pm
How does the due ARM processor compare to AVR32 UC3 (as seen in http://www.aery32.com/) speedwize? Is the ARM actually a lot faster?
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 03, 2012, 05:35 pm
No idea, I don't know much about the Xmegas.

_____
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 03, 2012, 07:23 pm
@ io53:

You can use the Atmel tables for comparison:

Here is the table for the AT32UC3 lineup:
http://www.atmel.com/PFResults.aspx#(data:(area:'',category:'34864[33180[33080]]',pm:!((i:8238,v:!(0,18)),(i:8394,v:!(0,17)),(i:8362,v:!(1,28)),(i:8282,v:!())),view:table),sc:1)

And here is the table for the SAM3X series:
http://www.atmel.com/PFResults.aspx#(data:(area:'',category:'34864[33177[39581]]',pm:!((i:8238,v:!(0,18)),(i:8394,v:!(0,17)),(i:8362,v:!(1,28)),(i:8282,v:!(0,1,2,3,4,5,6,7,8))),view:table),sc:1)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 04, 2012, 12:46 am
There's a fault in those links. If you cut and paste the whole test into a broswer it works though.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: charlie_dream on Oct 04, 2012, 02:42 am
http://hackaday.com/2012/10/03/finally-an-arm-powered-arduino/

Far removed from the legions of 3D printers featured at this year's Maker Faire in New York was a much smaller, but far more impressive announcement: The ARM-powered Arduino DUE is going to be released later this month.

Instead of the 8-bit AVR microcontrollers usually found in Arduinos, the DUE is powered by an ATSAM3X8E microcontroller, itself based on the ARM Cortex-M3 platform. There are a few very neat features in the DUE, namely a USB On The Go port to allow makers and tinkerers to connect keyboards, mice, smartphones (hey, someone should port IOIO firmware to this thing), and maybe even standard desktop inkjet or laser printers.

The board looks strikingly similar to the already common Arduino Mega. That's no mistake; the DUE is compatible with existing shields, so connecting a RAMPS board for your 3D printer should be a snap.

Here's a PDF (http://hackadaycom.files.wordpress.com/2012/10/due.pdf) the Arduino and Atmel guys were handing out at their booth. A few DUE boards have already made it into the hands of important people in the Arduino community, including 3D printer guru [Josef Prusa]. Sadly, the folks at Arduino didn't think media personalities needed a DUE before its release, so you'll have to wait until we get our hands on one later this month for a review.

@hackaday.com
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 04, 2012, 03:30 am

http://hackaday.com/2012/10/03/finally-an-arm-powered-arduino/

Far removed from the legions of 3D printers featured at this year's Maker Faire in New York was a much smaller, but far more impressive announcement: The ARM-powered Arduino DUE is going to be released later this month.

Instead of the 8-bit AVR microcontrollers usually found in Arduinos, the DUE is powered by an ATSAM3X8E microcontroller, itself based on the ARM Cortex-M3 platform. There are a few very neat features in the DUE, namely a USB On The Go port to allow makers and tinkerers to connect keyboards, mice, smartphones (hey, someone should port IOIO firmware to this thing), and maybe even standard desktop inkjet or laser printers.

The board looks strikingly similar to the already common Arduino Mega. That's no mistake; the DUE is compatible with existing shields, so connecting a RAMPS board for your 3D printer should be a snap.

Here's a PDF (http://hackadaycom.files.wordpress.com/2012/10/due.pdf) the Arduino and Atmel guys were handing out at their booth. A few DUE boards have already made it into the hands of important people in the Arduino community, including 3D printer guru [Josef Prusa]. Sadly, the folks at Arduino didn't think media personalities needed a DUE before its release, so you'll have to wait until we get our hands on one later this month for a review.

@hackaday.com



That kind of statement by who every originated it will most likely lead to damaged Due boards very quickly I suspect. The Due will be mechanicaly compatible to the standard shield layout, but the Due beings a 3.3 volt board is not compatible with older 5 volt only shields and this is bound to cause problems with begineers buying wrong shields or trying to use their existing shield boards. The Arduino team has added a new shield pin sense Rev 3 boards that can be used by newer shield designs to possibly support both 5 and 3.3 volt controller boards, but there will always be a potential trap there in my opinion. But maybe I'm being to negative, maybe the Due's shield input pins will all be '5 volt tolerent', or perhaps the damage is just in theory rather then in reality? I don't know for sure, but it will be interesting to see how this all works out.

Lefty
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 04, 2012, 04:07 am
Quote
maybe the Due's shield input pins will all be '5 volt tolerent'

I wouldn't bet on it, the SAM is in no way 5v tolerant (4v on a good day) so that would need extra circuitry, possible but not obvious from the photos and I can't see them adding 54 level converters or even 54 current-limiting resistors.

I think the Due will drive most shields (voltage wise, maybe not with current) and if not then no real harm done unless too much current is needed from IO pins, but any shield that returns 5v (probably just about all of them) has a good chance of shafting the SAM3. That will be a very expensive plug in and impossible for the average user to fix.

I will also be interested to see how this all works out.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Jantje on Oct 04, 2012, 09:45 am

Quote
maybe the Due's shield input pins will all be '5 volt tolerent'

I wouldn't bet on it, the SAM is in no way 5v tolerant (4v on a good day) so that would need extra circuitry, possible but not obvious from the photos and I can't see them adding 54 level converters or even 54 current-limiting resistors.

As there are very limited amount of mega shields I would only do it for the 18 standard pins.
Another option could be to market a "gobetween shield" that does this.


...but any shield that returns 5v (probably just about all of them)...

One of my favorite shields for high power engines is : http://www.robotpower.com/products/MegaMoto_info.html (http://www.robotpower.com/products/MegaMoto_info.html).
I'm not a hardware guy but as far as I can see this one should work fine on the due. It only feeds back on the analog pins for power consumption and that is limited to 3.3V.

If it is low power I use the adafruit motorshield https://www.adafruit.com/products/81 (https://www.adafruit.com/products/81) which -again as far as I can see" ok with 3.3 volts as there is no feedback from the shield.

I'm not sure of the gps shield I have. https://www.adafruit.com/products/98 (https://www.adafruit.com/products/98)

So it sure is not all of them  :D

Best regards
Jantje

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 04, 2012, 10:08 am

Quote
the SAM is in no way 5v tolerant (4v on a good day) so that would need extra circuitry, possible but not obvious from the photos and I can't see them adding 54 level converters or even 54 current-limiting resistors.



@Graynomad:
(1) Would the method of level converter or a resistor array allow compatibility with BOTH 5V shields AND 3.3V shields though?

(2) And if so, why didn't they add it on the Due board itself? (I see quite a bunch of free space on the board!)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: DuaneB on Oct 04, 2012, 10:22 am
It certainly looks like going straight to Due, will be getting beginners in way over thier heads, I wonder how many of the UNO Based tutorials would cause damage to the lower current, lower voltage Due ?

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: MichaelMeissner on Oct 04, 2012, 02:55 pm
One other thing to watch out for, the Arms 'double' is 64-bit, while the AVR compiler treats 'double' as the same as 'float'.  If you have structures with doubles in them, the structure size will grow, and obviously the ranges handled will be different.  If you have an application that goes down and unpacks/packs fp numbers, you will need to take this into account.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 04, 2012, 04:01 pm
This is the sort of thing that may bite people in the arse, and the reason you shouldn't really use int/char/etc for your variable types.

Up 'till now it hasn't mattered, but it may do with the Due. Of course it has more RAM so you may not notice of you're arrays double in size :)

@giantsfan3
(1) I guess series resistors would help with the 5v inputs to the ARM, it's not my preferred method though, I would consider that more of a cover your arse measure to limit the current in case of a stuff up.

(2) Dunno, price I suppose. Arduinos are not designed to have robust IO and that's fair enough. It may be though that the Due will be placed in harm's way a lot. Jantje seems happy that his shields will be OK so maybe it's not really a problem. But how many users can analyse that?

Quote
I wonder how many of the UNO Based tutorials would cause damage to the lower current, lower voltage Due ?

This is the sort of thing that may be a problem, a simple high-side switch to 5v and poof.

_______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: simon.monk on Oct 04, 2012, 06:37 pm
I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me.

Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

Arduino is a device for electronic hobbyists. 16 million things a second is faster than I've ever needed an Arduino to perform.


Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 04, 2012, 06:54 pm

I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me.

Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

Arduino is a device for electronic hobbyists. 16 million things a second is faster than I've ever needed an Arduino to perform.





I agree that 8 bit AVR chip based boards would still be the best entry point into the arduino world for most begineers, especialy for those new to the electronics side of the hobby. However the small SRAM space and limited clock speed on the 8 bit AVRs does rule out many valid hobbyist level projects that really can't be performed on the existing arduino hardware. A ARM based arduino board will open up new applications that simply can't be performed with a existing AVR based board without external harware required that a ARM based board may not require. It not a one or the other based choice, but rather matching the avalible hardware to the task.

My fear is that too many begineers will choose a Due over a Uno based on their possible future requirements rather then picking the best board for their entry into this hobby. The experts will already know how to select the best board for each specific project or application, but too many begineers will 'over buy' based on the wrong reasons.

Lefty
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: simon.monk on Oct 04, 2012, 07:01 pm
Quote

However the small SRAM space and limited clock speed on the 8 bit AVRs does rule out many valid hobbyist level projects that really can't be performed on the existing arduino hardware.


Maybe I am lacking imagination, but how about some examples?

Quote
My fear is that too many begineers will choose a Due over a Uno based on their possible future requirements rather then picking the best board for their entry into this hobby.


Definitely, a lot of people tend to buy the latest and best, even if it isn't the right one.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 04, 2012, 07:09 pm
Quote
Maybe I am lacking imagination, but how about some examples?


Well you are lacking in imagination I guess.  :D
But don't expect me to unlease my vast imagination for free, my ideas might be my ticket to vast fame and fortune.  ;)

That aside, I will probably not be an early buyer of a Due board. I did buy one of those Teeney 3.0 ARM based boards but mostly to support Paul's project and I won't be suprized if it sits in my 'get to it box' for some time even when it arrives later this month.  ;)

Lefty
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 04, 2012, 07:30 pm

I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me. Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.


@Si: But doesn't that mean that ALL ARM Cortex M3 and various other companies' 32-bit microcontrollers, have no applications?

Even based just on their popularity, I am sure there must be many advantages and applications to a 84 Mhz, 32-bit architecture that make it suitable somewhere in between the domain targeted by 8-bit AVRs and the domain targeted by, e.g., Raspberry Pi.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: MichaelMeissner on Oct 04, 2012, 07:48 pm

My fear is that too many begineers will choose a Due over a Uno based on their possible future requirements rather then picking the best board for their entry into this hobby. The experts will already know how to select the best board for each specific project or application, but too many begineers will 'over buy' based on the wrong reasons.

Lefty

I dunno, that assumes you expect people to have a different processor for each project.  I suspect a lot of hobbyists are like me, and only have a few processors (or just one), and then builds things to get a specific action and then tears it down, and goes on to the next project.  For example, on the UNO, I've bought several proto-shields so that I could keep the stuff wired up, but switch to the next project.

I see a lot of posts about people wanting to do video and audio on their embedded systems, so I don't think it is something you need to run an OS for.  I certainly have projects I want to do that involve video that are hard to do with Arduinos, and I'm certainly thinking that the Arms I just bought (teeny 3.0, radioblock, raspberry pi) might fill the bill.

Also, it sounds rather like the 'old' timers that complain about newbies having it so easy, and that everybody should go through the steps they did.  I started programming on IBM punch cards, but I don't expect kids starting out these days to go back to cards.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: simon.monk on Oct 04, 2012, 07:55 pm
Quote

@Si: But doesn't that mean that ALL ARM Cortex M3 and various other companies' 32-bit microcontrollers, have no applications?


Not amongst Hobbyists I expect.

Still waiting for the flood of examples ;)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 04, 2012, 07:56 pm


My fear is that too many begineers will choose a Due over a Uno based on their possible future requirements rather then picking the best board for their entry into this hobby. The experts will already know how to select the best board for each specific project or application, but too many begineers will 'over buy' based on the wrong reasons.

Lefty

I dunno, that assumes you expect people to have a different processor for each project.  I suspect a lot of hobbyists are like me, and only have a few processors (or just one), and then builds things to get a specific action and then tears it down, and goes on to the next project.  For example, on the UNO, I've bought several proto-shields so that I could keep the stuff wired up, but switch to the next project.

I see a lot of posts about people wanting to do video and audio on their embedded systems, so I don't think it is something you need to run an OS for.  I certainly have projects I want to do that involve video that are hard to do with Arduinos, and I'm certainly thinking that the Arms I just bought (teeny 3.0, radioblock, raspberry pi) might fill the bill.

Also, it sounds rather like the 'old' timers that complain about newbies having it so easy, and that everybody should go through the steps they did.  I started programming on IBM punch cards, but I don't expect kids starting out these days to go back to cards.


Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?

Lefty
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: DuaneB on Oct 04, 2012, 08:28 pm
Hi,

I guess there will be a lot of frustrated beginners wrecking Dues.

As for applications for the Due, I have in mind a psuedo modular synth - lots of oscillators, wavetables, analog inputs, some sort of low tech interface and a simulated patch panel.

16 bit audio should be very fast in a 32 bit mcu leaving enough cpu to implement the connections in the simulated patch panel for real in software.

Duane B
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: MichaelMeissner on Oct 04, 2012, 08:30 pm

Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?
Lefty

Right now (October 2012), the Uno.  However, I imagine by the January time frame, it would be probably be the Due.  There is a saying in parts of the US, that pioneers are the ones with arrows in their back, and anybody that buys a Due on day one is a pioneer.  But after the initial problems are sorted out, I see the current 8-bit chips going being more of a niche market.  Will it happen overnight?  Certainly not, but it will happen.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Jantje on Oct 04, 2012, 09:17 pm


Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?
Lefty

Right now (October 2012), the Uno.  However, I imagine by the January time frame, it would be probably be the Due.  There is a saying in parts of the US, that pioneers are the ones with arrows in their back, and anybody that buys a Due on day one is a pioneer.  But after the initial problems are sorted out, I see the current 8-bit chips going being more of a niche market.  Will it happen overnight?  Certainly not, but it will happen.

I fully agree with this. Certainly for newbies the stabilized due will be the platform of choice. It just makes everything easier. For instance it takes away the problem of memory management for small projects. You can do some really bad coding and still have enough cpu left not to notice.
It just makes the start easier and the old farts like me will do the hard work on the small slow 8 bit chips.
At least that means I will have a job until I die ;-)
Best regards
Jantje
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 05, 2012, 02:05 am
Here's a f'example.

I've been working on a framework that is basically a HAL like the Arduino (and does implement the Arduino functions) but has a lot more, such as string parsing, FIFOs etc.

Last I looked it was about 20k in size, a bit large for a Uno but no problems for a chip with a lot of flash. Now of course you don't have to go to an ARM to get a lot of flash, but with the smaller ARMs available for < $2 I just reckon it's easier to use them. Hopefully I can drop this code onto the Due when it arrives but it's not worth porting it to a Uno.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: westfw on Oct 05, 2012, 03:52 am
Quote
if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

I don't think that that follows.  There's a huge performance gap between the current Arduinos and a linux-system like Rasberry Pi.  Don't let the price similarities fool you.  While RPI and Due may have similar prices, you can transfer a project to your own Due-like system to lower costs.  While to make an RPI-based system at their price, I think you need to have RPi-like volumes...

Audio is one example; Due has enough performance to "do" audio without too much problem.  You can do SOME audio on an Uno, but it requires careful attention.

Anything that needs and operating system, but not a full-fledged linux, is another candidate.  Putting an OS on MEGA is possible, but memory and performance limits make it pretty challenging; more of a technology demonstration than a useful tool.

And remember, it's theoretically a less-than-zero-cost upgrade.  Due has more performance and more memory (both flash and ram) than a MEGA at LOWER list price.  In fact, it has capabilities similar to the Arduino ADK at about 30% less cost.  The briefly-mentioned Uno-Ethernet is (potentially) similarly cheaper than Arduino Ethernet and much cheaper than MEGA+Ethernet Shield.

Depending on acceptance and success, an ARM-based Uno-sized system is also possible, at Uno-like prices, with extra performance and memory...
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: keeper63 on Oct 05, 2012, 06:35 am
What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?


I vote for purchasing a copy of Grob's "Basic Electronics", a copy of "Art of Electronics", and a copy (set?) of Mims' "Mini-Notebooks" - plus a breadboard, a couple of "Super Surprise" boxes of floor sweepings from Electronic Goldmine, and a cheapo harbor freight multi-meter (free with coupon!). Plus some batteries I guess. Then they should sit and study those books, do the math (at least know what Ohm's Law is!), and attempt to understand why they shouldn't just willy-nilly hook parts up to their Arduino then wonder why it let the magic smoke out.

Does that make me sound like an "old man"? That I want people to understand the basics, to know how to walk, before they learn how to run? To have at least a basic understanding so they don't destroy (and get frustrated with) their $30.00 microcontroller board (Arduino or otherwise)? Is that too much to ask today?
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 05, 2012, 03:31 pm
Quote
Does that make me sound like an "old man"? That I want people to understand the basics, to know how to walk, before they learn how to run? To have at least a basic understanding so they don't destroy (and get frustrated with) their $30.00 microcontroller board (Arduino or otherwise)? Is that too much to ask today?


It probably really is asking too much. Today is more the world of near instant gratification, and learn by doing, etc. I suspect even us 'get off my lawn' types, if reborn into todays world would mot choose or wish to take the learning journey we did so many decades past. I think today an Arduino with a good starter kit is a good platform to start learning electronics from scratch, the key is if their using a good tutorial type book that lets them proceed step by step and stopping at times to discuss and explain the theory behind what each step is trying to teach them. With so much information avalible on the web these days, there is no shortage of good reference material, it just needs to be orginized and presented in proper context as one proceeds with their arduino projects.

Maybe those here that are actively involved with teaching students using arduinos as teaching aids would let us know what works and doesn't work well for their students? I'm more interested in how the electronics fundementals and theory proceeds rather then how the software skills are teached.

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Quarencia on Oct 05, 2012, 04:39 pm

I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me.

Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

Arduino is a device for electronic hobbyists. 16 million things a second is faster than I've ever needed an Arduino to perform.



Surprised so much of this discussion has centered around the processor as apposed to I/O.

Due 96 MHz, 54 digital I/O, 16 Analog Inputs (assuming it's I/O is the same as Mega)
RPI  700 MHz, 17 digital I/O, 0 Analog Inputs

If your project involves a lot of low level I/O with any appreciable sensor timing and filtering, Due sure seems to make much more sense to me.  The quad/multi copter crowd and home energy monitor crowd are eager for the power.  Large amounts of I/O require rather expensive hardware to interfce to the RPI via USB or a multiplexor on I2C which is relatively slow.

I have a home energy monitor on a Mega that uses 44 digital lines and 8 analog.  Monitoring HVAC status/run time, water pressure, water pump usage, water heater run times. Have an ultrasonic sensor on the oil tank measuring fluid level.  Have sensors on the power lines coming in to the house calculating energy usage "real time".  All this is logging to a MySQL data base on the NAS.  Also monitoring eight wifi enabled thermostats.  I sends out a plethera of alerts via LAN when certain adverse conditions are met.  There are (4) Windows 7 machines in the house each banging away on the LAN wih their polluting flood of device discovery messages (arduino has to process all of these that are pointed at it) , and the ATT Uverse router banging away with DHCP status messaging.  The Mega can get pretty taxed.  I have isues with the fluid level sensor and power monitoring when all of these things manage to stack up on top of each other.  Could I do all this with a PC...yes, but every time I've looked into it, the cost gets excessive quickly.  My $50 Mega, $20 ethernet shield, and $20 in various opto isolators and resistors is much cheaper, plus it doesn't consume nearly the power the PC based system would.

From my perspective, RPI is a small personal computer, not a microprocessor for imbedded logic projects.  I don't need the USB ports, video support, or other peripherals on the RPI.  I'm near the front of the line for a Due.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: MichaelMeissner on Oct 05, 2012, 06:47 pm
In terms of programming environments, I would prefer an intermediate step between bare metal programming (Ardunio) and running a full OS with full protection (Rasberry-pi, Beaglebone).  Many of the things I contemplate doing would be better expressed as a series of cooperating threads, rather than building state machines that keeps track of everything.

For example consider a setup with an IR receiver that is waiting for the user to push a button on a hand held IR transmitter like a TV remote, but at the same time, you want the chip to do what it is normally doing.  With cooperative threads, you would have one thread waiting on IR pulses, and when it gets a full sequence of pulses that it recognizes as say the 'up' button, then it sends a message that the button was pressed.  Sure on a bare metal system, you build a state machine for the IR pulses, etc.  and separate state machines for each of the other tasks.

One problem with threads, is each thread needs its own stack space, and machines like the Arduino have rather limited memory setups.  I'm not sure Due will solve this.

There is the QP state machine (http://arduino.cc/playground/Code/QP (http://arduino.cc/playground/Code/QP)) that I've thought about, but I haven't yet used it.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 05, 2012, 08:12 pm



Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?
Lefty

Right now (October 2012), the Uno.  However, I imagine by the January time frame, it would be probably be the Due.  There is a saying in parts of the US, that pioneers are the ones with arrows in their back, and anybody that buys a Due on day one is a pioneer.  But after the initial problems are sorted out, I see the current 8-bit chips going being more of a niche market.  Will it happen overnight?  Certainly not, but it will happen.

I fully agree with this. Certainly for newbies the stabilized due will be the platform of choice. It just makes everything easier. For instance it takes away the problem of memory management for small projects. You can do some really bad coding and still have enough cpu left not to notice.
It just makes the start easier and the old farts like me will do the hard work on the small slow 8 bit chips.
At least that means I will have a job until I die ;-)
Best regards
Jantje


I still say a begineer to electronics is better off starting with a Uno. One other reason would be the very wimpy output pins that ARM chips have, even driving a 20ma led will require a switching transistor making a learning lesson all that much more complex to build and understand. Most all tutorials showing interfacing to simple circuits will have to be revaluated to see if they are compatible with ARM output/input pin specs. I think the rather rugged I/O pins of the AVR 8 bitters work much to the favor of raw begineers. Keep pushing those Uno boards. I think many are focusing too much on what a ARM chip is better at, rather then also considering what a 328P chip is better at in context to someone first starting out building simple stuff to learn how electronics works.

Lefty
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Jantje on Oct 05, 2012, 10:54 pm

... One other reason would be the very wimpy output pins that ARM chips have, even driving a 20ma led will require a switching transistor making a learning lesson all that much more complex to build and understand. ...

I wasn't aware of that. This is indeed a really strong point for the UNO.
Best regards
Jantje
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 06, 2012, 02:01 am
I agree that a Uno is a better choice for a beginner who

a) won't be writing 10000 lines of code,
b) just needs to see a LED flashing and
c) will be following examples that will 99% be for a 5v Uno-style board with IO grunt.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: iyahdub on Oct 06, 2012, 02:22 am
You think i can use a DUE on my project of a spaceship to go to the Moon ?!
PS- My Arduino UNO didnt had enough Sram ...
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: westfw on Oct 06, 2012, 02:24 am
Quote
One problem with threads, is each thread needs its own stack space, and machines like the Arduino have rather limited memory setups.  I'm not sure Due will solve this.

I think the relevant number is the ratio of RAM size to thread state size (roughly, number of bytes of registers).  AVR is particularly weak here: 2048/32 = 64.  Due is about 96k/(4*16) = 1536, so that SHOULD be a lot better.

Quote
even driving a 20ma led will require a switching transistor

Or a driver chip.  OTOH, these days for a lot of apps you can just use a 1mA LED instead...
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: MichaelMeissner on Oct 06, 2012, 05:09 am

Quote
One problem with threads, is each thread needs its own stack space, and machines like the Arduino have rather limited memory setups.  I'm not sure Due will solve this.

I think the relevant number is the ratio of RAM size to thread state size (roughly, number of bytes of registers).  AVR is particularly weak here: 2048/32 = 64.  Due is about 96k/(4*16) = 1536, so that SHOULD be a lot better.

Well it would be less than that since you have to account for the stack frame size of each thread.  Having more ram also means you can think about using dynamic allocation (in moderation).  There are certainly ways to do it in memory starved environments, but it takes more effort (essentially going back to a state machine for each thread).

However, if the DUE has 100k RAM or so that the SAM3X83 has on chip, it still in inadequate for doing much with video.  A QVGA (320x240) image with 3 bytes/pixel, is something like 225K, and if you wanted to full hog to HD video, that is 5 megabytes per picture.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: DuaneB on Oct 06, 2012, 07:28 am
Reading the data sheet, there is a large section on the different types of memory which was over my head, but gave the impression that it would not be too difficult to attach banks of high speed external memory.

Duane B
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 06, 2012, 07:44 am
Yes the SAM chip is designed to access external memory, 8x16Meg (or 4x16Meg, depends on what part of the data sheet you read) of SRAM and possibly more of other types like SDRAM although I've not looked into them.

I doubt the signals will be all broken out on the Due but you never know.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: DuaneB on Oct 06, 2012, 12:15 pm
Quote
I doubt the signals will be all broken out on the Due but you never know.


I hadn't considered that while wading through the datasheet.

I hope that some form of native external memory support is available, it will open up all sorts of audio sampling projects.

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Jantje on Oct 06, 2012, 02:23 pm
Note: I'm not a hardware guy so this may be complete crap.
I have been thinking about the "wimpy output pins that ARM chips, even driving a 20ma led will require a switching transistor"
Now I ask myself:
Would it be possible to make a go between kind of like shield that would cater for this shortcoming?
I'm thinking about having a mosfet on all(?) pins in parallel to (in)direct access to the pin via the header. This way you could chose to have a resistive load on the mosfet or (in)direct access to the 3.3 pin.
I'm saying (in)direct because maybe some extra stuff (I wouldn't know what) could allow for switching between mosfet, 3.3V and 5V. With solder paths the headers could be connected to the pin with the desired functionality. (maybe you guys are smart enough to do it automatically)
Maybe not all options (mosfet, 3,3 and 5Volt) are needed for all pins. I think the UNO digital and analog pins are the first to look at. And probably pin 0 and 1 are never used by any shield as it would ruin the USB communication on the UNO. Which makes 16 pins for all options.

Any input from people who know what they are talking about when it deals with electronics?
Best regards
Jantje

PS
For the UNO there is a go between shield that disconnects the pins from the headers and uses solder paths to connect the pins to the headers. This is part of the solution I'm thinking of "http://tronixstuff.wordpress.com/2012/01/18/review-mayhew-labs-go-between-arduino-shield/"  (http://"http://tronixstuff.wordpress.com/2012/01/18/review-mayhew-labs-go-between-arduino-shield/")
I say mosfet because mosfet have a smaller voltage drop and internal resistance but maybe transistors or anything else is far better. (I really don't claim I know)

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 06, 2012, 05:43 pm

Note: I'm not a hardware guy so this may be complete crap.
I have been thinking about the "wimpy output pins that ARM chips, even driving a 20ma led will require a switching transistor"
Now I ask myself:
Would it be possible to make a go between kind of like shield that would cater for this shortcoming?
I'm thinking about having a mosfet on all(?) pins in parallel to (in)direct access to the pin via the header. This way you could chose to have a resistive load on the mosfet or (in)direct access to the 3.3 pin.
I'm saying (in)direct because maybe some extra stuff (I wouldn't know what) could allow for switching between mosfet, 3.3V and 5V. With solder paths the headers could be connected to the pin with the desired functionality. (maybe you guys are smart enough to do it automatically)
Maybe not all options (mosfet, 3,3 and 5Volt) are needed for all pins. I think the UNO digital and analog pins are the first to look at. And probably pin 0 and 1 are never used by any shield as it would ruin the USB communication on the UNO. Which makes 16 pins for all options.

Any input from people who know what they are talking about when it deals with electronics?
Best regards
Jantje

PS
For the UNO there is a go between shield that disconnects the pins from the headers and uses solder paths to connect the pins to the headers. This is part of the solution I'm thinking of "http://tronixstuff.wordpress.com/2012/01/18/review-mayhew-labs-go-between-arduino-shield/"  (http://"http://tronixstuff.wordpress.com/2012/01/18/review-mayhew-labs-go-between-arduino-shield/")
I say mosfet because mosfet have a smaller voltage drop and internal resistance but maybe transistors or anything else is far better. (I really don't claim I know)




I suspect a 'go between shield' board that converted all the ARM pins to active 5 volt signals capable of sinking and sourcing 30+ ma is possible, but how would you switch them from output pins to input pins via sketch mode commands? No, I think that actual hardware arduino projects will now (or soon post DUE release) have take two different paths, one for the 5 volt higher current capable boards and one for the new 3.3 volt lower current world. It will just be cheaper to buy both kinds of boards rather then to expect some kind of 'go between' board to solve the rather drastic electrical different I/O pin capablities between AVR and ARM chip boards.

Lefty 
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Oct 06, 2012, 05:48 pm
I think so to, plus how do you deal with analog pins? They can be digital IO as well. It gets very tricky.

I suspect that future shield makers will have to accommodate both voltages if they want to be compatible with both types of base board. That's pretty easy to do on a shield because you know what pins you are using for what. Isn't that what the IOREF signal is to be used for?

_____
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: retrolefty on Oct 06, 2012, 06:03 pm

I think so to, plus how do you deal with analog pins? They can be digital IO as well. It gets very tricky.

I suspect that future shield makers will have to accommodate both voltages if they want to be compatible with both types of base board. That's pretty easy to do on a shield because you know what pins you are using for what. Isn't that what the IOREF signal is to be used for?

Yes, The voltage applied to the IOREF pin from the controller board will tell the shield board what kind of host Arduino controller board is being mated with. However that is only avalible on the newer Rev3 arduino boards, not the zillions of pre UNO and MEGA rev3 boards. Chaos will be present for some time ahead.  :D

A shield maker might (or will?) have to state if their shield design is Due only, Due and Rev 3 Uno and Rev 3 Mega compatible, or only non-Due board compatible I guess for one to purchase a future shield and be sure it's compatible with what they are using?

Lefty


_____
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: bperrybap on Oct 06, 2012, 07:57 pm

Ok, but lets focus a bit. What would be your recommendation to a newbie to the hobby (with little or no electronics or software experiance) as to which would be their best choice to enter the arduino world once the Due is in fact avalible. I vote Uno, you vote ?

Lefty

For a beginner needing shield compatibility yes, an UNO makes sense, but
I might lean a bit more towards a Leonardo as it can do many interesting things with USB
that can't be done with UNO.

That said, I'd guess an absolute beginner probably doesn't need shield compatibility initially,
so a Teensy board might be an even better choice than an Uno.
It's much smaller, a bit cheaper,  has more resources than an UNO.
(more i/o pins, more RAM, more flash),  has native USB capabilities,
and is also breadboard friendly which makes it much easier to play round with than
an UNO.
For little bit more and about the same cost as an UNO, there is Teensy++ which
has 4X the code space, 4X the RAM and more than twice the i/o pins as UNO.

IMHO, Teensy++ solves the code, RAM, and I/O pin issues for most projects.

Teensy boards are also nice because of their size and form factor they can easily move
from a breadboard prototype to a 1 off project as it can easily be squeezed into many
environments that a Arduino factor simply doesn't fit very well.

With respect to the DUE being a solution for
more speed and resources than the UNO, there are other solutions out there already that
may be more cost effective than the DUE that the DUE will have to compete against.
For example, Chipkit boards. The Chipkit UNO32 is about same cost as the Arduino UNO
(nearly half the cost of the DUE)
but it has the CPU power of the DUE with 5V tolerant inputs in the form factor of the UNO.


---- bill

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Grumpy_Mike on Oct 06, 2012, 11:45 pm

Maybe I am lacking imagination, but how about some examples?


The Due fits between the things an arduino can't do because of limited speed / memory and the stuff the Raspberry Pi can't do because it is not a real time system.

So some examples:-
1) Driving a decent resolution graphics display. (LDC or OLED)
2) Sound sampling and manipulation
3) Direct video digitization / generation
4) Controlling stepping motors for CNC with look ahead acceleration / deceleration
5) RFID access control with a decent size database and response time.
6) Oscilloscope / logic analyser with decent sample depth.

Add to that the portability remembering the Raspberry Pi takes 700mA to drive.

Now go and write your Due book.  :P
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Docedison on Oct 07, 2012, 02:11 am
I Wonder where our Friends in Shenzhen are with this because on the 22nd of this month a LOT of crap from there is going to be devalued a bit due to the Due and just how many DFRobot shield issues there are going to be... the one with a bi-polar in place of a Mosfet?.

Bob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: kd7eir on Oct 07, 2012, 02:29 am
Quote

Now go and write your Due book.  :P


I was thinking the same thing!
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 07, 2012, 04:49 pm

Add to that the portability remembering the Raspberry Pi takes 700mA to drive.


RPi current draw actually can be a half of that or less depending on which peripherals/processes you are running, but still at least a dozen times larger than a barebones SAM3X8E-based board.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: pjrc on Oct 19, 2012, 09:37 am


Add to that the portability remembering the Raspberry Pi takes 700mA to drive.

RPi current draw actually can be a half of that or less depending on which peripherals/processes you are running, but still at least a dozen times larger than a barebones SAM3X8E-based board.


If you look at table 46-11 on page 1401 of the SAM3X datasheet, there's total current specs.

Running from flash at 84 MHz is 76.47 mA.  Clocking slower saves power.  At very slow speeds, it looks like the current approaches about 15 to 16 mA.

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: giants_fan3 on Oct 19, 2012, 03:12 pm
This makes me wonder: Are ARM7 processors in smartphones (like the one in the iPhone) somehow designed for extremely low current draw? Shouldn't they consume more current than a 84-Mhz SAM3X would... As in, how do smartphones still get such long lifetimes while the processor is handling presumably a LOT of instructions, and also additionally using display, graphics driver, Wi-fi, GPS, etc.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: bperrybap on Nov 01, 2012, 08:08 pm

Quote

@Si: But doesn't that mean that ALL ARM Cortex M3 and various other companies' 32-bit microcontrollers, have no applications?


Not amongst Hobbyists I expect.

Still waiting for the flood of examples ;)


Ah, but what if a 32 bit MCU came in a DIP package and was roughly the same
cost as the 8 bit AVR?
Wouldn't it make sense to take a serious look at it?
and perhaps leave the 8 bit world behind?

I think something like the new Microchip pic32 28pin dip parts would be a much better option than
all these ARMs for hobbiests. ARM is really a technology and not a processor.
ARM is great for embedding in custom silicon designs, something hobbyists will probably never need.

Consider this.
An Arduino board based on the pic32 28 pin dip parts would return Arduino back to its roots,
which is what got all the interest to begin with.
The pic32 parts are currently readily available and only cost slightly more than a mega328
in QTY 1.

http://www.mouser.com/Microchip/Semiconductors/Embedded-Controllers-Processors/Microcontrollers-MCU/32-bit-Microcontrollers-MCU/_/N-a85nm?P=1z0zl2wZ1z0z63x&Keyword=pic32&FS=True (http://www.mouser.com/Microchip/Semiconductors/Embedded-Controllers-Processors/Microcontrollers-MCU/32-bit-Microcontrollers-MCU/_/N-a85nm?P=1z0zl2wZ1z0z63x&Keyword=pic32&FS=True)

It is 32 bit vs 8 bit with a linear address space so no more hassles with having to deal with things
like progmem and having to constantly declare things 8 bit in order to optimize code.
For beginners I think it would actually be an easier environment to work with
than the AVR architecture while offering much more processing power and RAM than the AVR based parts.

The pic32 DIP parts seems to hit a very nice sweet spot in that it solves many of the wants for more
performance and resources yet still can provide a nice easy to work with package for hobbyists,
students, and DIYers.

My fear is that the DUE product has strayed a bit far away from the hobby and educational markets
that originally made Arduino so popular.

--- bill
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: Grumpy_Mike on Nov 01, 2012, 08:43 pm
Quote
I think something like the new Microchip pic32 28pin dip parts would be a much better option than
all these ARMs for hobbiests.

The hobbyists market is a total irrelevance for all semiconductor manufacturers, it is just a flee byte in there sales. Even the Arduino has hardly made a blip for Atmel. Massimo said this in his talk to the Open Source conference in 2011.

What hobbyists are doing is riding the wave on the back of industry. Just at the moment we can do this however it will become increasingly more difficult.

Quote
For beginners I think it would actually be an easier environment to work with
than the AVR architecture

The whole point of the arduino is that it abstracts the AVR environment out of existence, as does the Due. It is still under the hood if you want it but most do not venture into those parts.

Quote
My fear is that the DUE product has strayed a bit far away from the hobby and educational markets
that originally made Arduino so popular.

Fear not and just see what happens.
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: bperrybap on Nov 01, 2012, 10:51 pm

Quote
I think something like the new Microchip pic32 28pin dip parts would be a much better option than
all these ARMs for hobbiests.

The hobbyists market is a total irrelevance for all semiconductor manufacturers, it is just a flee byte in there sales. Even the Arduino has hardly made a blip for Atmel. Massimo said this in his talk to the Open Source conference in 2011.

Obviously.
While irrelevant in terms of revenue, it can be very relevant in terms of mind share as
students that learn/know a particular technology in school might carry that knowledge/familiarity
forward into their real-world jobs, where they will be making product design decisions that will
affect manufacturers revenue.

All that said, I'm guessing that vast majority of Arduino sales go to the hobbyist/educational market
and that was the point I was trying to make. "The Arduino market *IS* the hobbyist market."
High density pin count surface mount or BGA packages are pretty much non-starters for most DIYers trying
trying to build their own projects. Those types of users are much more likely to
experiment with parts in DIP packages.

My guess is that many current Arduino users would be very happy with a
faster 32 bit processor with more flash and RAM than the mega238 in the same 28 pin DIP package.
Particularly when that part can offer additional features like DMA, USB, 5v tolerant inputs,
and real-time clock all at pretty much the same price point.

If I were a teacher, I'd much rather put more rugged devices into the hands of students
that won't blow up when they accidentally do things like hook up a MCU pin to a 5v sensor.
Having a pic32 based Arduino would offer the chance to use 3v devices or 5v devices
while playing with a 32 bit environment all at the same price point and same ability to move
designs to to a standalone board as the current UNO.
This is something that simply cannot be done with DUE.

Quote

Quote
For beginners I think it would actually be an easier environment to work with
than the AVR architecture

The whole point of the arduino is that it abstracts the AVR environment out of existence, as does the Due. It is still under the hood if you want it but most do not venture into those parts.

But Arduino doest extract away enough AVR, which is why it is difficult to bring up new processor like the ARM on DUE.
It is missing many things in the core library that are needed for higher level i/o libraries.
It wasn't even until recently that the pin numbers for certain functions like LED, analog pins, etc...
were abstracted on the AVR chips.
And then don't forget the progmem and 8 bit variable issues that have to be dealt with in
user code (sketch). Arduino code is littered with these types of needed optimizations
even in sketch/user-land code.
Things like progmem go completely away when using other non-harvard
architectures and you no longer have to educate users on the s/w complexities of having to
use multiple address spaces. Instead, things like "const" in C/C++ code just work
and you can start to use ints for loops and counters without fear of reduced performance
or increased code size.

Quote

Quote
My fear is that the DUE product has strayed a bit far away from the hobby and educational markets
that originally made Arduino so popular.

Fear not and just see what happens.

It will be interesting for sure.

--- bill
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: pico on Nov 02, 2012, 05:12 am

But Arduino doest extract away enough AVR, which is why it is difficult to bring up new processor like the ARM on DUE.
It is missing many things in the core library that are needed for higher level i/o libraries.


One advantage of the relatively simple AVR architecture is that it provides a gentle transition for the beginner to intermediate stage when the programmer needs to (or simply wants to) go beyond what's offered by the Arduino/wiring core libs. Direct port IO for faster/multiple pin manipulation. Managing multiple interrupt handlers. Inline assembly code. On AVR, all pretty easy stuff to get a handle on for the novice ready to move to next step for the AVR chips.

OTOH, the ARM architecture is much more complex. Nested interrupt handlers, anyone? Even porting conceptually straightforward code from the AVR world to the ARM can raise some tricky questions. For example, I ported Dean Camera's ATOMIC BLOCK routines from AVR to ARM, so I could use them on the Maple... which yielded some interesting and curly questions on how to emulate something as conceptually simple as "cli" an a processor like the ARM, where there is potentially _a lot_ of stuff happening in parallel in the silicon.

Anyway, I don't see the one step transition from Arduino to ARM in the same way you can go from Arduino to AVR. If you were teaching the principles of uC programming, you certainly wouldn't start with ARM in any case (or at least, I wouldn't); something like an AVR, 8051 or 6502 architecture and instruction set is far more tractable. I'd introduce ARM only at the sophomore or senior level once the students had passed the intro uC course.

So is the the Due a suitable dev board design for beginners? It might turn out to be OK, but it's certainly far from optimal. OTOH, it may yet turn out to be a white elephant stuck in the netherworld between niches. I agree with Bill that an electrically more robust chip, preferably still in a DIP package (like the Microchip pic32 part Bill mentions), would be much more consistent with what made the first gen Arduinos attractive to neophytes in the first place. (While even MIPS is not exactly ideal as a learning architecture, it's still a hell of a lot simpler than ARM.)

We shall see.

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Nov 02, 2012, 05:30 am
Quote
Nested interrupt handlers, anyone?

That is one fundamental difference, by default on the Due you are not safe from other interrupts when in an ISR.

Quote
how to emulate something as conceptually simple as "cli" an a processor like the ARM,

I've done this on an LPC

Code: [Select]

#define ATOMIC_START __disable_irq();__interruptLevel++;
#define ATOMIC_END if ((__interruptLevel) && !(--__interruptLevel))__enable_irq();


I haven't tested it yet and may have a -- in the wrong place or something but the idea is that I disable all interrupts at the start of an atomic block but only re-enable them if they were enabled when I entered the block.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: pico on Nov 02, 2012, 05:49 am

Quote
Nested interrupt handlers, anyone?

That is one fundamental difference, by default on the Due you are not safe from other interrupts when in an ISR.

Quote
how to emulate something as conceptually simple as "cli" an a processor like the ARM,

I've done this on an LPC

Code: [Select]

#define ATOMIC_START __disable_irq();__interruptLevel++;
#define ATOMIC_END if ((__interruptLevel) && !(--__interruptLevel))__enable_irq();


I haven't tested it yet and may have a -- in the wrong place or something but the idea is that I disable all interrupts at the start of an atomic block but only re-enable them if they were enabled when I entered the block.


You still need to consider the many and several membar/memory fence instructions if you really want a robust equivalent of cli. You would have to look at what __disable_irq()/__enable_irq() do exactly, but if they simply compile down to the the standard single special register instructions -- CPSID I and CPSIE I -- not enough to fully emulate cli...

As I say, there are some threads on the Leaflabs forum where this was discussed in some gory detail. ;)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Nov 02, 2012, 07:40 am
Thanks pico,

Quote
if they simply compile down to the the standard single special register instructions -- CPSID I and CPSIE I --


They do, so I've added the three barrier instructions along the lines of what x893 had in one of those threads. As nobody argued his code in the last two months I'm figure it's kosher until I look into this more deeply.

As I understand it though as I'm using an M0 it's not important, but makes the macro pore portable.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: pico on Nov 02, 2012, 07:50 am
And of course don't forget the ::: "memory" compiler barrier (gcc specific, probably -- need to find the equivalent on your compiler/assembler).

Then I think you've got what was termed the "thermonuclear option". :)
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Nov 02, 2012, 08:20 am
Quote
"thermonuclear option".

Correct, if one barrier is good then three is better eh?

I'm using GCC (Code red/LPC Xpresso IDE) so I'll add the ::: memory, I get the need to flush pipelines etc but don't really understand these instructions yet. No matter, meanwhile I'll do do what others have done, shoulders of giants and all that. :)

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: pico on Nov 02, 2012, 09:23 am

so I'll add the ::: memory


Don't forget the quotes around "memory".

If you are using gcc, you should be fine. The "memory" directive tells the compiler not to reorder the assembly instructions with respect to the C code statements in an optimisation step -- at least from from memory. ;)

Then you've successfully ported CLI. phew!
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Nov 02, 2012, 09:49 am
Quote
Then you've successfully ported CLI. phew!

One down ? to go.

I'm porting the Arduino core stuff onto LPCs, slowly but surely :) I think I can run any standard program now but haven't tested that much I admit.

______
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: GoForSmoke on Nov 15, 2012, 06:59 pm

There are gotchas though, on the LPCs the GPIO ports don't work until you enable their clock, I spent some time wondering why my writes had no affect. Same goes with the  other peripherals.

Presumably this sort of thing will not bother any Due users.

_____
Rob


Arduino has Serial.begin() and TBH I don't know what-all that does. LPC.begin()?

Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: graynomad on Nov 16, 2012, 01:33 am
Serial.begin() just enables the UART, sets the baud rate etc.

On the Due the equivalent of an LPC.begin() will be in init() I would think. That's why they get the big bucks, so we don't have to worry about such things :)

_____
Rob
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: freeze on Mar 30, 2013, 09:35 pm
"You think i can use a DUE on my project of a spaceship to go to the Moon ?!
PS- My Arduino UNO didnt had enough Sram ..."

http://downloadsquad.switched.com/2009/07/20/how-powerful-was-the-apollo-11-computer


Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: jerriclynsjohn on Mar 31, 2013, 01:13 pm
www.facebook.com/cybercratz
Title: Re: Arduino Due (released Oct 22, 2012) Compatibility
Post by: GoForSmoke on Mar 31, 2013, 07:06 pm
When the first landing was on the way down, a side program that was loaded crashed the computer.

That one caused a panic, the error message was a number btw.