Atmega328P-PU alternatives if more memory is needed

I'm now using the other RX and TX pins on the 1284P, pins 16 and 17.

Apparently, now there's a "content mismatch":

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10   128    0 no       4096    8      0  9000  9000 0xff 0xff
           flash         65    10   256    0 yes    131072  256    512  4500  4500 0xff 0xff
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file "C:\Users\darkmind\AppData\Local\Temp\builda0a6f5001444c8205e288eec322f909c.tmp/HeadUnit.ino.hex"
avrdude: writing flash (23544 bytes):

Writing | ################################################## | 100% 3.10s

avrdude: 23544 bytes of flash written
avrdude: verifying flash memory against C:\Users\darkmind\AppData\Local\Temp\builda0a6f5001444c8205e288eec322f909c.tmp/HeadUnit.ino.hex:
avrdude: load data flash data from input file C:\Users\darkmind\AppData\Local\Temp\builda0a6f5001444c8205e288eec322f909c.tmp/HeadUnit.ino.hex:
avrdude: input file C:\Users\darkmind\AppData\Local\Temp\builda0a6f5001444c8205e288eec322f909c.tmp/HeadUnit.ino.hex contains 23544 bytes
avrdude: reading on-chip flash data:

Reading | ##################################################Error uploading sketch.
 | 100% 2.73s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0080
         0x20 != 0x0c
avrdude: verification error; content mismatch

avrdude done.  Thank you.

So just to get it straight -- even if the Arduino Uno board is not the best choice for programming a standalone Atmega1284P-PU, it can still be done, "if all the stars align", right?

carguy:
<...>
So just to get it straight -- even if the Arduino Uno board is not the best choice for programming a standalone Atmega1284P-PU, it can still be done, "if all the stars align", right?

Yes. Many times, no probs. But I'm an advanced user.

It is sooooo much easier using one of Crossroads 1284 boards.

Ray

Having wrestled with the Arduino Uno as an ISP for my standalone 1284P for another couple of fruitless hours, I think it's really time I had a look at inexpensive alternatives. My current setup just doesn't seem to get me anywhere. I can burn a bootloader, but then when I try to upload sketches via the Uno board, I keep getting "content mismatch" error messages.

How about this as a USB programmer for the 1284P-PU??

http://www.ebay.de/itm/FT232RL-FTDI-USB-auf-TTL-Serien-Converter-Adapter-Modul-5V-3-3V-/301876321218?hash=item46493b1bc2:g:vicAAOSwPc9WxsmC

Could I use this module to program my standalone 1284P-PU?

If the Rx/Tx connection fails, have you ever tried to upload using ISP? I'd burn a compatible bootloader first, before trying to upload sketches.

I've successfully burned a bootloader onto my 1284P-PU using the Arduino Uno and the sketch "Atmega_Board_Programmer.ino", as devised on Nick Gammon's web page: Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board

Burning the bootloader is no problem, I've actually done it a few times now. But then when I try to upload a sketch to the 1284 via the Uno board, I just keep getting errors. It tells me that the serial port is either not present or that the board is not connected. I've checked my wiring many times over, it just doesn't seem to be the problem.

So what do you think of the adaptor on eBay?

DrDiettrich:
If the Rx/Tx connection fails, have you ever tried to upload using ISP? I'd burn a compatible bootloader first, before trying to upload sketches.

If Op is uploading via ISP, s/he will overwrite the bootloader every time.

Ray

carguy:
<...>
Burning the bootloader is no problem, I've actually done it a few times now. But then when I try to upload a sketch to the 1284 via the Uno board, I just keep getting errors. It tells me that the serial port is either not present or that the board is not connected. I've checked my wiring many times over, it just doesn't seem to be the problem.
<...>

If you can ISP the bootloader, just ISP the sketch... and forget about the stinking serial issues. Most likely, you have some interference with the serial-USB system ... it could be AC hum from unshielded wiring, flaky connections ...

To upload a sketch using the Arduino ISP, choose "Upload using programmer" option in the File menu, or use the keyboard shortcut: "CTRL+SHIFT+U".

Ray

I've just flashed the Optiboot bootloader with Atmel Studio:

Atmel Studio was able to read the chip's device information, fuses, memory etc. correctly, btw. So there is probably some sort of connection present after all.

I just really can't upload any sketches.

I'm done with this, really. One and a half days wasted for nothing.

I'm going to order the FTDI adaptor.

carguy:
I've just flashed the Optiboot bootloader with Atmel Studio:

Atmel Studio was able to read the chip's device information, fuses, memory etc. correctly, btw. So there is probably some sort of connection present after all.

I just really can't upload any sketches.

I'm done with this, really. One and a half days wasted for nothing.

I'm going to order the FTDI adaptor.

You can use Arduino Uno (if the chip is removable, or is it removable only on Duemillanove?) as an ftdi, if you remove the chip.

You don't need to remove the chip to use the board as a USB/Serial adapter, just connect it's reset to Gnd,
Will need to manually press reset on the target board.

Too late, I've ordered... :slight_smile:

With a five- or six- standalone client I2C network that I've got planned for this project, I was painfully underequipped with my two Uno boards anyway... so as far as programming devices go, buying another one for €5 was probably not a bad idea, regardless...

carguy:
Too late, I've ordered... :slight_smile:
<...>

Great! Those things are about as important as a Digital Voltmeter... just about a necessity.

Using ISP, you have the entire flash for your program and there isno delay after power-on or reset... your sketch starts right up.

Ray

CrossRoads:
You don't need to remove the chip to use the board as a USB/Serial adapter, just connect it's reset to Gnd,
Will need to manually press reset on the target board.

I tried that too tonight. Several times. It simply does not work with my 1284P here... I don't know what I have been doing wrong, if anything, but the way things are now, the 1284P is refusing to accept any sketch uploads at all, kicking and screaming.

I'll get back to the 1284P circuit when my FTDI breakout arrives here... I've still got lots of other things to sort out...

Could be your bootloader has been overwritten then.

CrossRoads:
Could be your bootloader has been overwritten then.

... be my guess, too. But bootloaders are over-rated, IMO and the cause of far too many headaches. There need to be a separate forum section just for bootloaders... it seems that everyone is off making their own naked boards and immediately having bootloader issues.

Ray

I guess the secret there is to KISS - Keep It Simple (Stupid).
I use a 16 MHz crystal and bootload my 328Ps as Unos, my 1284Ps as Bobuinos, and my 2560s as Mega. No problems.

CrossRoads:
I use a 16 MHz crystal and bootload my 328Ps as Unos, my 1284Ps as Bobuinos, and my 2560s as Mega. No problems.

Well, if Arduino had never implemented the silly resonator on the UNO in the first place .... (no one pays attention to the crystal timebase on the 16U2 !!!)

Newbies simply do not understand the concept of the resonator/crystal plus load caps, either. And solderless breadboards are a complex arrangement of low-pF capacitors at every node.

Readers: I know many of you want to build your own boards and I understand the enjoyment of that accomplishment, but please consider purchasing a pre-made board that has a layout from a EE or other professional. The circuit boards are inexpensive and are designed for you to assemble as a kit. You will be proud of your assembly and have far less problems (maybe even none if your soldering skills (and reading skills) are good 'nuff.)

In the past, I have used boards from Crossroads and they are very high quality and very reasonable in price. Highly recommended.

Ray

My FTDI232 breakout board has now arrived in the mail.

Still can't upload any sketches. I've connected it to my breadboard Atmega1284P-PU the same way as here:

Only difference being that I'm not using an FTDI cable but this breakout:

http://www.ebay.de/itm/FT232RL-FTDI-USB-auf-TTL-Serien-Converter-Adapter-Modul-5V-3-3V-/301876321218

The breakout installs automatically under Windows 7, and it's also recognized by the Arduino IDE on com port 16. But as far as uploading sketches, still nothing. I always get an error that the programmer is not in sync/not responding.

I've double checked all connections, and I've also burned a bootloader onto the 1284 again, exactly like in that link from Nick Gammon's web page. Burning the bootloader with the Arduino Uno board was no problem.

I've also tried using a different Atmega1284P-PU. It too doesn't give me any trouble when I burn a bootloader onto it, but when I try to upload sketches, I've got the same problems again.

What could I be doing wrong?

And by the way, which programmer do I have to select for my FTDI breakout in the "Tools" menu in the Arduino IDE?

EDIT:

Looks like I've been had... my FTDI breakout appears to be identical to this one here:

https://dyball.wordpress.com/2015/09/12/rant-shame-ftdichip-for-bricking-my-arduino-programmer/

In other words, it's a fake, a cheap imitation that will not work as it is supposed to.

I've tried using it to upload sketches to an Atmega328P-PU on a breadboard. To make sure that it should have been working, I first uploaded a sketch to the 328 on that same breadboard using an empty Uno board as serial programmer. No problems. But then when I plugged in the FTDI board, once again I couldn't upload any sketches.

What a ripoff.

I'm probably going to have to buy an actual functioning programmer. Kind of a shame about the five bucks down the toilet for this piece of junk.

IIRC, you can "fix" the counterfeit FTDI boards by using an older driver.
You may have to do some magic to keep windows from "updating" the driver back to the newer one.