Arduino Due on a Breadboard?

Hello,

I am interested in doing the exact same thing as Derek Malloy did in his video.

I will be making a custom board using the SAM chip as my microcontroller, and I would like to use the Arduino IDE to compile onto the chip. Since the Arduino Due is not a DIP package, and I am not able to just flash and take the chip out of the board, what are my options?

I essentially want to do sometihng like this (link below) with the Due, and not resort to ARMStudio or other ARM IDEs (i really enjoy Arduino IDE).

Any suggestions?

Thanks, community.
Daniel

Use this instead:
http://www.pjrc.com/store/teensy3.html
Teensyduino installs into the IDE to provide support for his teensy boards.

No messing with download cables or power supplies. Just uses a standard
USB cable and you program it over the USB cable.

--- bill

I totally agree... I would also like to see an introduction into use the ARM based MCU used on the Arduino DUE.

I think the issue with creating a breadboard compatible breakout board for the SAM3X8E is that it has 144 pins vs the 28 you have on the ATMege328.

Far out 72 pins per side... :slight_smile: Would almost fill up the length of your breadboard. It can be shortened by only breaking out the important pins.

It can be shortened by only breaking out the important pins.

Nooooo, one person's "don't need that" is another person's "can't live without it" :slight_smile:

Bring all possible pins out.

But it won't be 144, there's about 40 pins for power and other CPU stuff, most of which you would not break out.


Rob

I was watching the video and see that at around 8:15 into the video the chap replaces the 16MHz crystal with a 20MHz crystal and states that the arduino exactly behaves the same with the 20MHz as with the 16MHz.

Does he mean it continues to run at 16MHz and therefore behaves the same or does he mean it's now running at 20MHz and behaving the same - the delay statements in his blink sketch delaying the same amount of time with the 20MHz as they previously delayed with the 16MHz?

Martin.

warwound:
I was watching the video and see that at around 8:15 into the video the chap replaces the 16MHz crystal with a 20MHz crystal and states that the arduino exactly behaves the same with the 20MHz as with the 16MHz.

Does he mean it continues to run at 16MHz and therefore behaves the same or does he mean it's now running at 20MHz and behaving the same - the delay statements in his blink sketch delaying the same amount of time with the 20MHz as they previously delayed with the 16MHz?

Martin.

I am just as confused about it before. If the delay is based on a prescale value and the timer, how does the blinking not get effected without a change in software?

Daniel

Does the 20Mhz crystal run 'underclocked' at 16Mhz...?

Let wait for the knowledgeable forum members lol!

Martin.

bperrybap:
Use this instead:
PJRC Store
Teensyduino installs into the IDE to provide support for his teensy boards.

No messing with download cables or power supplies. Just uses a standard
USB cable and you program it over the USB cable.

--- bill

Not sure how this would help me out. I want an ARM based MCU and this line doesnt seem to support so. If only the DUE would have DIP package :frowning:

Daniel

dgelman:
Not sure how this would help me out. I want an ARM based MCU and this line doesnt seem to support so. If only the DUE would have DIP package :frowning:

I had a look at a 120pin DIP MCU the other day and it was huge!!! Was over 150mm long.

Have you considered looking at SAM3N? They are the same family as the Due's SAM3X but comes with less features and less pins... :grin:

Does the 20Mhz crystal run 'underclocked' at 16Mhz...?

I didn't watch the video, but if ALL he did was swap 16 for 20Mhz it had to have had an affect on the speed the program does things.

If only the DUE would have DIP package

If you want ARM + DIP you have to go for an LPC111x (DIP28) or LPC81x (DIP8), these are also available in several SOIC packages that are pretty user friendly.

The SAM3X (as used in the Due) is also available in a 100-pin package that is a lot smaller.

120pin DIP MCU the other day and it was huge!!! Was over 150mm long.

I assume that is a module, not the actual chip itself.

The largest DIP I've seen was the old 68000 processor, at 64 pins that was a monster known as the "aircraft carrier" package.


Rob

dgelman:

bperrybap:
Use this instead:
PJRC Store
Teensyduino installs into the IDE to provide support for his teensy boards.

No messing with download cables or power supplies. Just uses a standard
USB cable and you program it over the USB cable.

--- bill

Not sure how this would help me out. I want an ARM based MCU and this line doesnt seem to support so. If only the DUE would have DIP package :frowning:

Daniel

Ah.. Look again. This time look closer. Teensy 3 is an ARM based processor.

--- bill

Why didn't you just say so... XD

At that price its well worth it and its breadboard friendly.

Here is the schematics if you want to build it your self: Teensy and Teensy++ Schematic Diagrams

warwound:
Does he mean it continues to run at 16MHz and therefore behaves the same or does he mean it's now running at 20MHz and behaving the same - the delay statements in his blink sketch delaying the same amount of time with the 20MHz as they previously delayed with the 16MHz?

The chip will run faster because the clock is greater but.... the software based on timers will break. Let me explain. The Arduino core sets up the timers to work with a 16 MHz clock based MCU: if you change the clock but you don't recompile the code for the newer speed, the timings will be wrong, so millis & delay will run faster, and 1000 ms won't be 1 second anymore; the serial could stop working because of the wrong timings etc...
And keep in mind that not all the libraries can adapt themselves to different clock speeds: it's the author that has to implement inside its software a mechanism to check the current clock speed and adapt the library to it, if this is necessary.

leo72:

warwound:
Does he mean it continues to run at 16MHz and therefore behaves the same or does he mean it's now running at 20MHz and behaving the same - the delay statements in his blink sketch delaying the same amount of time with the 20MHz as they previously delayed with the 16MHz?

The chip will run faster because the clock is greater but.... the software based on timers will break. Let me explain. The Arduino core sets up the timers to work with a 16 MHz clock based MCU: if you change the clock but you don't recompile the code for the newer speed, the timings will be wrong, so millis & delay will run faster, and 1000 ms won't be 1 second anymore; the serial could stop working because of the wrong timings etc...
And keep in mind that not all the libraries can adapt themselves to different clock speeds: it's the author that has to implement inside its software a mechanism to check the current clock speed and adapt the library to it, if this is necessary.

Thanks for the info - i sort of assumed that was the case.

Martin.

So just to get back into the conversation.

If I develop a custom board with the SAM3X and bring out the RX/TX pins, is it possible to hook up the Arduino Due to these pins and compile code to the SAM3X on the custom board, rather than the chip on the Due? I can probably sacrifice my board and remove destroy the connections that go to the chip on board, or perhaps there is a smart way to bypass it? I understand that if you want to do this with the Uno, you must remove the ATMEGA328 from the board. But since you cannot do that with the Due how can we do this?

Another possible solution would to get an ARM-type external programmer that is compatible with the Arduino IDE and bring out the ICSP pins from the SAM3X. I am not sure if this technique may be used similar to AVR programming.

Any suggestions on how to upload my sketch onto a custom board using the SAM3X would be much appreciated.

Thanks,
Daniel

is it possible to hook up the Arduino Due to these pins and compile code to the SAM3X on the custom board, rather than the chip on the Due?

I'm not quite following I think. Do you mean pass the Rx/Tx through from the Due to your board?

That might work if you manually erase the SAM first (you have implemented the erase feature with the push button or something I assume).

I can probably sacrifice my board and remove destroy the connections that go to the chip on board,

I don't get this.

Another possible solution would to get an ARM-type external programmer that is compatible with the Arduino IDE and bring out the ICSP pins from the SAM3X.

That's more like it, implement the JTAG/SWD header and buy a cheap programmer.

Another way is to run your Rx/TX to a header and buy a Taigiuino programmer.

http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=72_73&products_id=2213

This would be my preferred method I think.

You should also implement the erase function, have a look at their schematics for their Due clone

http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=72_73&products_id=2224&zenid=bk6gdpcd20oto2deimv40mln56


Rob

Daniel,
I'm curious, what was your objection to just using the teensy 3?

--- bill

is it possible to hook up the Arduino Due to these pins and compile code to the SAM3X on the custom board, rather than the chip on the Due?

I'm not quite following I think. Do you mean pass the Rx/Tx through from the Due to your board?
That might work if you manually erase the SAM first (you have implemented the erase feature with the push button or something I assume).

I can probably sacrifice my board and remove destroy the connections that go to the chip on board,

I don't get this.

The video at the top of the thread shows how to compile your sketch onto an external ATMEGA328 using the Arduino Uno board. He removes the chip from the board, places it on a breadboard and was able to compile the code by passing the Rx/Tx lines from the board to the chip on breadboard.

I would like to do the same with the Arduino Due and the SAM3, but this seems to be troublesome because the chip on the Due is soldered on. My question is how can I program an external SAM3 using the Arduino Due.

If it is possible to somehow by pass the chip on the Arduino Due, and pass the Rx/Tx lines to a bootloaded SAM3 on a custom board, this would be ideal for me.

Another possible solution would to get an ARM-type external programmer that is compatible with the Arduino IDE and bring out the ICSP pins from the SAM3X.

That's more like it, implement the JTAG/SWD header and buy a cheap programmer.

Another way is to run your Rx/TX to a header and buy a Taigiuino programmer.
This would be my preferred method I think.

I will look into this, I have no idea the JTAG header does but from previous research, it looks like this will need to be used to compile code onto the chip

You should also implement the erase function, have a look at their schematics for their Due clone

How would this help me ?

Daniel

I'm curious, what was your objection to just using the teensy 3?

Bill, I don't see a difference between the Teensy and the Arduino Due, other than the Teensy has a footprint where you can pop it into a breadboard. The chip is still soldered down and you cannot use this platform to externally program a SAM3 that I want to embed into my custom board.

My goal is to create a board using a SAM3 and use the Arduino IDE to compile my sketch onto it. The Teensy breadboard footprint is good for prototyping, those stages are complete in my project.

Daniel

Hi Daniel
did you be able to have a circuit working? because I would like to have a try.. reha