atmega1284 programming from a 328 chip

Hi guys,

I've purchased a chip off e-bay which was programmed with the bootloader so I could learn about these devices, but without purchasing the normal arduino board as funds were tight. I have the device running on a breadboard flashing the led using the default example code. However one of the projects I want to build requires a 40 pin chip as there isn't enough pins on the standard chip. If I purchased a blank atmega1284p can I upload a bootloader to it using the current chip running the Uno platform ?

Actually you have two different issues to deal with, 1. installing a bootloader onto a blank 1284P chip and 2. modifiying the arduino IDE to be able to function with a 1284P based chip.

The first is rather simple if you use Nick's great sketch that runs on any arduino board and will interrogate the target chip and if it sees that it is a 1284P will install a booloader onto the chip. Although I'm not sure what 'flavor' bootloader it installs.

http://www.gammon.com.au/forum/?id=11635

The second task is to download and install the needed files and folders to modify the arduino IDE to allow it to work with the 1284P chip. Member maniacbug has done all the hard work and has all the file/folders needed to allow that to happen. However the detailed step by step instructions to follow are beyond my ability right now, I just kept fuszing around with it rather randomly and with most difficulty finally was able to get the IDE to work with a 644P chip, as I'm still waiting for a 1284P chip to show up in the mail. So it's certainly doable but all the steps needed can be error prone if it's your first time and no one is around to hold your hand. ;)

https://github.com/maniacbug/mighty-1284p

Thanks for the input.

Is there already a 40 pin DIP Arduino that can be purchased with a bootloader installed ?

The idea is to breadboard the project and then design a PCB, rather than go down the route of using shields. I did something similar with a PIC some years back

However, I had a lot of assistance with PicBASIC Pro and having now discovered Arduino's love how easy it is to develop the code and move the project along quickly...

If you want to build standalone devices a $10 ISP programmer is much better than messing about with bootloaders.

You can also use them to set the chip fuses, etc. (which is something you'll want to do...)

http://www.ebay.com/sch/i.html?_nkw=arduino+isp+programmer

malc-c: Is there already a 40 pin DIP Arduino that can be purchased with a bootloader installed ?

Ar you sure you need one? It's easy to add extra I/O to Arduinos using external shift registers, eg. the 74hc595...

Thanks for the links...

To be honest, I need to do some further research, I wasn't under the impression that the AVR could be programmed like a PIC chip. If that is the case then one of those ISP might be the option. I'll also look at shift registers, but ideally having direct ports would be easier for my brain cells round :)

malc-c: To be honest, I need to do some further research, I wasn't under the impression that the AVR could be programmed like a PIC chip. If that is the case then one of those ISP might be the option.

Google for "standalone arduino"...

fungus:
Google for “standalone arduino”…

Have done, but most throw up breadboarded 328 chips, which is what I currently have

Sounds like you need a duemilanove style 1284 board: Schematic, suggested PL here http://www.crossroadsfencing.com/BobuinoRev17/ Bare boards $5 mailed to you, paypal to me, cardinalflyer at comcast dot net

Looks like it :)

I'll drop you an e-mail shortly

Crossroads... sent you a mail but not received a reply.. looking for the cost of a bare board and a bootloader programmed 1284 posted to the UK. Can you advise please

When did you send it? I don’t think it arrived, I’ve been watching for one. Or I missed in the daily flood of forum e-mails.

Anyway, $5 for the board, $8.14 for the 1284Pchip, no charge for bootloading, $5 for shipping in padded envelope.
So $18.50, paypal to cardinalflyer at comcast dot net

You will be building up for 16 MHz operation with a crystal, yes?

Hi,

Yes, using a 16mhz xtal with caps.

Have sent you a PM regarding the previous mail etc

Malcolm

Robert,

Fantastic service - and whilst I wait for a few of the other components to arrive I’ve breadborded the 1284p as per this schematic

having downloaded the files from the site http://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/ I can select the board in the drop down list, however when I come to upload the blink example I get the attached error.

I’ve tried swapping the TX / DX leads - no affect, different baud rates - no affect - on my FTDI board I get what seems to be a good comms as both TX and RX leds pulse, and shorting these wires results in an echo on the serial monitor, so the FTDI is working fine.

Anyone have any suggestions. I thought the transition from PIC to AVR / Ardunio was going to be a smooth one !

Can't see the schematic, try again?

Do have DTR connected as well? If not, you'll need to press Reset after the "Binary sketch size" message comes up.

Lets see if this works

ignore the ISP connections, I've just used the serial connection shown

and yes I've tried DTR connected via the 0.1uf capacitor, and without - It doesn't get that far to reset the chip

Hi Crossroads Could I use my JTAGICE that has a ISP 6pin connector to program a bootloader into a ATMega1284p? Would I use the Aduino IDE or AVR Studio 4.18? How does this chip fair as an Arduino say with the SPI system for the W5100 ethernet controller. I ordered a few of these from Mouser. I also have a STK500 also I could use with a 16Mhz crystal too. Don

I don’t know what is involved with using JTAGICE to program via ISP. This came up in another thread recenly, outlook was not good.
I use Atmel AVR ISP MKii myself, thru the IDE. Have to find the IDE driver here for it:

Its an 8-bit AVR, so would fair as well as the others for W5100 ethernet controller.

@malc-c

What FTDI are you using? Also, it is possible you have the RX and TX swapped. It will not hurt anything to try swapping those leads.

cyclegadget: @malc-c

What FTDI are you using? Also, it is possible you have the RX and TX swapped. It will not hurt anything to try swapping those leads.

It's a sparkfun FT232 Brakeout board. It worked fine with the original 328P, and I've also tried swapping the TX and RX lines over. I get pulses on the TX / LX leds, its as if the software is sending a request to upload the data, but not receiving the Ok to send it. I'll strip the breadboard and re-wire it just in case I've missed something (I seem to remember I had a similar issue with the 328P until I tied one of the voltage reference pins to supply.)