atmega1284 programming from a 328 chip

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

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

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 Arduino on ATmega1284P | maniacbug 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.)

Well after spending most of my time sorting out the arrangements following a bereavement in the family I have been able to spend a few hours trying to get the 1284P to talk with the PC and upload a program. But to no avail.

Just to prove that the FTI breakout board was working fine, I breadboarded the 328P chip I received off e-bay, and could upload the blink and fade exampled with no issue. Breadboarded the 1284P and hooked up the FTI board - no matter what board I select from the dropdown option I get the attached error.

Looks like I'll have to have a re-think on my project to see if I can do all the control I want using the 328P :frowning:

malc-c:
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

If this is board, it appears to provides 3.3V be default, not 5V,

You definitely need to have the DTR wired via 0.1uF cap to do the proper reset. You also need to
have the Rx,Tx pins swapped as shown in your schematic, if using a regular FTDI cable or FTDI Friend.
For the sparkfun board, you just have to be certain the signals flow in the correct directions.

I always use 1K resistors in Rx,Tx lines in case of mistaken cross-wiring.

Thanks for the reply. The Sparkfun board has a means of running at 5v (basically de-solder a link and bridge the two pins ( FT232RL Solder Jumper Picture - SparkFun Electronics Forum )

Like I said, it works fine when using the normal 328P with the uno bootloader. It looks to me as if the optiboot isn't talking the same language or at the same speed ! - hence the protocol error

Bit more googling and it seems to be due to resetting too soon. I found this regarding the error - OK it's related to programing the 328... but my guess it the same thing happening with the 1284P

Having investigated this a bit, it seems that the problem is because the Optiboot loader resets the ATMega328 when the serial port is opened. When avrdude is started up to program the slave chip it firsts opens the serial port then tries immediately to write to it. The initial comms fail because the chip has reset and, whilst in the bootloader, isn’t actually responding to the STK500 protocol.

Just need to find a way of resolving it