ATmega1284P: End to End using 1.0 IDE

westfw:

Can someone tell me more about this issue?

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=107115

Uhm.. I read that thread but it seemed to me that those guys had problems using the 1284p at 20 MHz. But I'm using it at 16 MHz, and they said that at this speed the issue shouldn't appear.

Another strange thing is.... why was I able to upload a sketch using a 12 MHz external resonator and I wasn't using a 16 MHz crystal?
who was the problem: the speed or the kind of the clock?

optiboot_atmega1284p-u1.hex

http://code.google.com/p/optiboot/downloads/list

spcomputing:
optiboot_atmega1284p-u1.hex

http://code.google.com/p/optiboot/downloads/list

Thanks, I'll try that but I'll try to find a solution for UART0 issue too..

Thanks, I'll try that but I'll try to find a solution for UART0 issue too..

Good luck my friend. It will be greatly appreciated. I heard, but could not verify (Failed bootload for me) that the Bobuino worked with UART0 and external crystal and Cadunium as well (failure for me as well). The Original Mighty 1284 will bootload with a crystal, but the communications have lantency.

Optiboot-1284p with a resonator operates perfectly on a breadboard.

Bobuino works fine with UART0. I bootloaded 50 boards and downloaded a simple sketch into them before sending the boards to Singapore.
I'm really not understanding where the issue is coming from.
Do you suppose its a fuse setting thing?

Here's what's in my boards.txt file

bobuino.name=Bobuino
bobuino.upload.protocol=arduino
bobuino.upload.maximum_size=130048
bobuino.upload.speed=115200
bobuino.bootloader.low_fuses=0xff
bobuino.bootloader.high_fuses=0xde
bobuino.bootloader.extended_fuses=0xfd
bobuino.bootloader.path=optiboot
bobuino.bootloader.file=optiboot_atmega1284p.hex
bobuino.bootloader.unlock_bits=0x3F
bobuino.bootloader.lock_bits=0x0F
bobuino.build.mcu=atmega1284p
bobuino.build.f_cpu=16000000L
#bobuino.build.core=arduino:arduino
bobuino.build.core=standard
bobuino.build.variant=bobuino

Here's the bootloader hex file & bobuino pins_arduino.h file used with the mighty1284 core files.
I loaded the mini1284 with these - bootloader went in first try, and then 30 sketch downloads as I tested each pin for LED blinkability one at a time.

optiboot_atmega1284p.hex (1.47 KB)

pins_arduino.h (6.08 KB)

Hi Bob, it seems that this issue only affects DIP chips and your board has SMD MCUs.
Moreover, it seems that this bug doesn't have any clear criteria..
On AvrFreaks forum it's said that it affects DIP chips with 20 MHz crystals, someone here said that it only affects crystals and not resonators, someone else said to use an RC filter but it didn't worked for me.

I know for sure that FOR ME:

  1. at 16 MHz with an external crystal, it DID NOT work, nor at 115200 bps nor at 57600 bps, nor with or without the RC filter
  2. at 12 MHz with a ceramic resonator it DID work at 115600 bps.

So I will buy a 16 MHz cer.res. and I'll try that.

EDIT:
fuses are OK, and I don't get any error after the flash of the bootloader. And it works well too, it flashes the led when I try to upload a sketch but then it fails.

It seems I've solved. :stuck_out_tongue:

Steps I did:

  1. I changed the crystal: same clock (16MHz) but different maker;
  2. put the RC filter as said in the thread of AvrFreaks (R: 10K; C: 100pF);
  3. cut the pins of the C to have them as short as possible and put on the breadboard as close as possible at the RXD0 pin

After several uploads I finnaly can say that now it works correctly. XD

I changed the crystal

Any idea whether there are different specifications for the two crystals that might be relevant?

Same files/settings work on DIP based boards too:
Original Bobuino, Duemilanove style Bobuino, even wirewrap test board.
Maybe the problem is the Programmer? I use Atmel AVR ISP MKii. Nick Gammon's Uno as programmer also appears to work.



I haven't fussy with crystals either.
Either a no name crytal from here
http://www.dipmicro.com/store/XC7-16000
or the lowest cost crystal from Digikey/Mouser that came up when I was ordering other parts.
And 22pF crystals.

westfw:

I changed the crystal

Any idea whether there are different specifications for the two crystals that might be relevant?

No, I don't.

@Bob:
I used my Arduino UNO as an ISP programmer. I removed the 328 and wired up the following pins: RX/TX/RST/5V/GND.

..these are the baudrate errors for the 115k2:
8MHz 7.8%
12MHz 7.5%
16MHz 3.7%
The errors are off the spec. The 12MHz resonator may work as the ceramic resonators are +/- 1-2% sometimes.

Heh, those date codes look much newer (1139 and I think 1050). Mine are 1021s. Maybe those are the Atmel "fixed batches".

What is your datecode leo72?

spcomputing:
What is your datecode leo72?

I'm not at home now. Today I'll check it.

spcomputing:
Heh, those date codes look much newer (1139 and I think 1050). Mine are 1021s. Maybe those are the Atmel "fixed batches".

What is your datecode leo72?

Mine is marked 1139.

Rats...

I have one ATmega 1284p recently bought. Mine is 1209. But I was unable to burn the bootloader with manic archives and Uno as the ISP programer with 16Mhz crystall resonator. Error was something realated to signature.
Maybe it helps

svalls:
I have one ATmega 1284p recently bought. Mine is 1209. But I was unable to burn the bootloader with manic archives and Uno as the ISP programer with 16Mhz crystall resonator. Error was something realated to signature.
Maybe it helps

Thanks for the info. Mine was not the signature, it was a page write type error. Once the bootloader installed, you could upload blink to the microcontroller, but if the sketch size got over ~25kb, it would choke with the page write error.

Whenever you get a chance, try Nick's programmer with the D9-8MHz signal on your 1284p. If it bootloads, hook up the external crystal and try to upload Nick's programmer (~25kb) to the 1284p.

I sometimes think if the 1284p worth the time spent... It is a shit that Arduino doesn't officialy support the 1284p, the Atmega2560 it's fantastic, but not for learn as it is impossible (or at least for me) to solder on a PCB. And the 328 it's like a toy, i go over the 32Kb flash in no time.

Maybe its the choice of programmers.
I've been using Atmel AVR ISP MKii for a while now to program '1284Ps, and I don't have any problems.
Everyone else seems to be struggling with everything but.