Pages: [1] 2 3 4   Go Down
Author Topic: atmega1284 programming from a 328 chip  (Read 4677 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Google for "standalone arduino"...


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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 14, 2013, 08:31:30 am by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like it smiley

I'll drop you an e-mail shortly
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Yes, using a 16mhz xtal with caps.

Have sent you a PM regarding the previous mail etc

Malcolm
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !



* error.png (62.03 KB, 772x661 - viewed 19 times.)
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2 3 4   Go Up
Jump to: