All Forums > Wiring Hardware Questions

Using Wiring IDE, Duemilanove to upload sketches to a 1284P

(1/3) > >>

yombo:
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)

barragan:
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:
Ok, I will do the tutorial. I shall have the micros in ten days...

Regards

yombo:
Hi

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


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

--- End code ---

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: ---Duemilanove    1284
-----------    ----
10 (SS)        9 (RESET)
11 (MOSI)      6 (MOSI)
12 (MISO)      7 (MISO)
13 (SCK)       8 (SCK)
--- End code ---

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:
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: ---atm1284p16MHz.extended_fuses=0x05
--- End code ---

and change it to:


--- Code: ---atm1284p16MHz.extended_fuses=0xFD
--- End code ---

That should do it.

b

Navigation

[0] Message Index

[#] Next page

Go to full version