Go Down

Topic: atmega1284 programming from a 328 chip (Read 5395 times) previous topic - next topic

malc-c

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 ?

retrolefty

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

malc-c

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...

fungus

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
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

fungus


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...
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

malc-c

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


fungus


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"...
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

malc-c




Google for "standalone arduino"...



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

CrossRoads

#8
Jan 14, 2013, 02:22 am Last Edit: Jan 14, 2013, 02:31 pm by CrossRoads Reason: 1
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
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

malc-c

Looks like it :)

I'll drop you an e-mail shortly

malc-c

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

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

malc-c

Hi,

Yes, using a 16mhz xtal with caps.

Have sent you a PM regarding the previous mail etc

Malcolm

malc-c

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 !


CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up