Author Topic: Using Wiring IDE, Duemilanove to upload sketches to a 1284P  (Read 6841 times)

0 Members and 1 Guest are viewing this topic.

yombo

Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« on: October 01, 2011, 05:42:36 PM »
Hello!

I've been using Arduino IDE and a Duemilanove to program ATMEGA328P uC's for a while now.

Recently I discovered the 1284P, wich is the biggest Atmel micro in DIP format, i think. Good to have many pins for a two-wheeler robot I'm planning. And no SMD parts so I can solder them... Also the Wiring IDE seems more advanced :)

So my question is, wether I can burn the bootloader and upload sketches to an 1284P using the Duemilanove. If so, I would buy some 1284's, wich are cheap at RS:
http://es.rs-online.com/web/p/microcontroladores/7193932/

I've just uploaded the blink led sketch with Wiring IDE and the Duemilanove to a 328P and it works nice. To upload the sketch I remove the 328P from the Duemilanove and connect Vcc, Gnd, RX and TX to the breadboard.

So would be these the steps for a 1284...?
-Burn bootloader:
1- Select Tools -> Board -> Arduino -> Arduino Duemilanove
2- Select serial port
3- Upload the Wiring ISP sketch to the Duemilanove (with 328P put on)
4- Wire the MISO, MOSI, SCK and SS signals (and Vcc, Gnd) from the Duemilanove to the breadboard with the 1284, crystal -16 MHz- and caps.
5- Select Tools -> Board -> Atmel -> ATmega 1284P(A) @ 16 MHz (crystal)
6- Select Tools -> Burn Bootloader -> w/Wiring ISP

-Upload sketch:just like I've done with a 328P, only selecting the 1284P.

I still have to look up wich pins on the Duemilanove are the MISO, MOSI, SCK and SS...

Would it be so simple? The Wiring IDE is cool!


Thanks in advance

(sorry for my english)
« Last Edit: October 01, 2011, 06:17:44 PM by yombo »

barragan

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #1 on: October 02, 2011, 05:56:05 PM »
hi, thank you, the right board should be Board -> Atmel -> ATmega1284P with the proper speed selection 8 or 16 MHz
Yu also need to burn a boot loader on the chip, there is a tutorial to burn a boot loader on a DIP part here: http://wiring.org.co/learning/tutorials/atmegaDIPbootloader/index.html and a tutorial for then using the part with a serial breakout here: http://wiring.org.co/learning/tutorials/atmegaDIP it should be easy to do this for your DIP part. If you do, please add a tutorial to the wiki.wiring.co
Let me know.

yombo

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #2 on: October 03, 2011, 03:34:28 PM »
Ok, I will do the tutorial. I shall have the micros in ten days...

Regards
« Last Edit: October 03, 2011, 03:35:59 PM by yombo »

yombo

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #3 on: October 15, 2011, 03:22:19 PM »
Hi

I have bad luck burning the bootloader on the 1284's, it gives this error:

Code: [Select]
***failed; 
avrdude: verification error, first mismatch at byte 0x0000
         0x05 != 0xfd
avrdude: verification error; content mismatch

I've been able to burn the bootloader on some new 328P's, so I don't know why it does not work on the 1284.

I connect the following pins on the arduino to the 1284:
Code: [Select]
Duemilanove    1284
-----------    ----
10 (SS)        9 (RESET)
11 (MOSI)      6 (MOSI)
12 (MISO)      7 (MISO)
13 (SCK)       8 (SCK)

And 5V to pins 10 and 30, and ground to pins 11 and 31 (on the 1284)
Also I connect the 16 MHz crystal and the 22 pF capacitors.

Then I upload the Wiring ISP sketch on the Duemilanove, then select the board Atmel->Atmega1284P(A) @ 16 MHz, and finally try to burn the bootloader.

I don't know what is wrong since the 328P's get burned and programmed ok. I've checked the connections many times.

Any help appreciated

bhagman

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #4 on: October 16, 2011, 03:11:22 AM »
That sounds like the extended fuses aren't being programmed properly by avrdude.

Avrdude has a problem understanding which bits are "don't cares".

Here's what you need to do:

In hardware/Atmel, edit the boards.txt file, and go to the line:

Code: [Select]
atm1284p16MHz.extended_fuses=0x05
and change it to:

Code: [Select]
atm1284p16MHz.extended_fuses=0xFD
That should do it.

b

yombo

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #5 on: October 16, 2011, 08:21:37 AM »
It works!!  :) :) Just got the 1284 blinking a led :D

I'm going to do the tutorial, but I don't know how to add a page in the tutorials section of the wiki's main page (it is not editable)

I've already done the images of the breadboard (with fritzing), it would be a matter of minutes to do the tutorial.

Thanks for the tip!

barragan

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #6 on: October 17, 2011, 12:27:52 AM »
great! you can create your own account on the wiki and start a new page I will link it from the tutorials section directly, please let me know if you need anything : )

bhagman

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #7 on: October 17, 2011, 01:02:24 AM »
Yeah, I'll fix that in the repo.  Thanks for testing.

b

yombo

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #8 on: October 18, 2011, 06:50:36 PM »
I finally did the tutorial. It took a bit more time than expected, and I've been a bit busy.

Here it is:
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove

Regards

barragan

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #9 on: October 18, 2011, 07:20:01 PM »
fantastic : ) please edit the tutorial and add your credits to it, I have linked it from the front page.
« Last Edit: October 18, 2011, 07:33:09 PM by barragan »

Bam_Sam

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #10 on: March 13, 2012, 06:26:24 PM »
Using a mac:
Using Arduino "Uno"

I have the same error message:

***failed; 
avrdude: verification error, first mismatch at byte 0x0000
         0x05 != 0xfd
avrdude: verification error; content mismatch

so I have changed:

atm1284p16MHz.bootloader.extended_fuses=0X05
to
atm1284p16MHz.bootloader.extended_fuses=0xFD

in Hardware/Atmel/boards.txt.

I restarted Wiring, re-uploaded WiringISP onto Arduino Uno, then again Burn Bootloader, but with the same exact Error:

Am I changing the wrong boards.txt?

Please help... Thanks

Bam_Sam

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #11 on: March 13, 2012, 06:52:17 PM »
OK, decided to re-install Wiring with edited boards.txt and it did the trick.

Bhagman thank you! This has helped me big time!!!!

MStark

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #12 on: January 01, 2016, 03:03:43 PM »
OK, decided to re-install Wiring with edited boards.txt and it did the trick.

Bhagman thank you! This phenq at https://skinnyexpress.com/phenq-review has helped me big time!!!!

Where is the edited boards.txt?
« Last Edit: June 07, 2016, 12:09:15 PM by MStark »

Qynx

Re: Using Wiring IDE, Duemilanove to upload sketches to a 1284P
« Reply #13 on: March 21, 2016, 05:35:42 PM »
In hardware/Atmel, edit the boards.txt file,