problem with avrispmkii and atmega1284P

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't seem to get my avrispmkII to program an atmega1284p
I have a PC dev board that I've used with atmega32's that has a 10 pin ISP and a 10 pin JTAG socket on them. I've wired a 6 pin ISP socket to the board to handle the Atmel AVRISP mkII. I've used an Adafruit USBtiny ISP programmer before with the atmega32's but it won't handle devices with more than 64K of flash. I HAVE used the new Atmel avrispmkII with Arduinos having atmega328, and atmega2560 processors so I know that the avrispmkII does work.

What happens when I hook up the avrispmkII to my dev board is that the bicolor led flashes orange which usually means the device is hooked up wrong. It is NOT. On the Arduino I can pull the processor out of the socket and connect the ISP and it indicates green (also indicates green WITH the processor in place). On my dev board it flashes orange with or without the processor in place. I tried wiring up ONLY the power and ground from the Arduino to the ISP and then it DID flash orange.

Finally I tried connecting my JTAGMKII to the dev board and I could issue the avrdude command:
avrdude -cjtagmkII -pm1284p -Pusb and the jtag was able to read the device signature correctly.

I had begun to suspect the 7805 regulator on my dev board, but the power looks good on my TEK465, no sign of noise and the voltage is dead nuts on 5v (the ISP should be fine with cpu power from 1.8-5.5 volts anyway). There might be a ground loop, but I tried both a wall wart 12v brick and a Lamda supply to feed the 7805 with no difference.

I've been using the Arduino IDE to drive AVRdude, it works for the atmega328 and the atmega2560. I think have the correct mods for the atmega1284p, but I can't yet get that far anyway. I will try burning the bootstrap with the jtag from the command line, but so far that doesn't work from the arduino IDE.

I can't figure out why the avrispmkII hw does not sync up with the atmega1284p processor. I've verified that MISO, MOSI, SSCK, RESET, +5 and GND all go to the right pins on the processor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How is the 1284P being clocked. Many other threads here have noted it is far more sensitive to crystal oscillation than other AVRs. If you use 8..20MHz you must make sure CKSEL is fused for "full swing" or it simply won't work (and that includes ISP).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sheesh. I betcha that's why I have has such a run around with all the 1280s I've been using. Remind me to send you a Christmas Present.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
How is the 1284P being clocked. Many other threads here have noted it is far more sensitive to crystal oscillation than other AVRs. If you use 8..20MHz you must make sure CKSEL is fused for "full swing" or it simply won't work (and that includes ISP).

Interesting. Well the clock fuses were set for the normal 8-20mhz external crystal. HOWEVER I had problems with programming the thing from the start with the chip still set with the factory internal RC oscillator (chicken and egg problem).

Also I had no problems programming the part with a Dragon (in either ISP or JTAG mode, but in ISP mode the Dragon is as slow as crap sliding down sandpaper!), usbtiny (which can't verify any part greater than 64K but DOES program it as verified with one of the other programmers), or a flaky jtagmkII which ONLY sometimes works in jtag mode (never ISP mode). My Jtag has been through hell and back with burned traces on the board repaired, etc....

Also note there have been many reports of the 1284P going into reboot fits when clocked at 20mhz if both serial ports are being used. I am using an 18.432 mhz rock. If the problem here is with the clock 'getting into' the usart logic then using the full swing oscillator might make it worse. Also note that the reboot issue only seems to happen with the 40 pin dip parts, not the SMT packages. Weird.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

If you use 8..20MHz you must make sure CKSEL is fused for "full swing" or it simply won't work (and that includes ISP).

Yep, I can vouch for that.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I managed to set the clk fuses with the jtag (0xf7 low fuse for the atmega1284p). The avrispmkII still blinks the bicolor led on connection to the chip and I've verified that the connections are correct. Yet this programmer does work on Arduinos with atmega328 and atmega2560 processors. Nothing looks wrong on the scope. And the Dragon works with ISP on the '1284P but SLOW!
Anybody know what the current firmware level is on the avrispmkII? maybe I need an upgrade (or downgrade!)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, a resonator works where a crystal will not. Is this the -PU package? I am curious of what date code you have.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does it blink orange right from the start???
or after you tried to program?

you run on 18MHz xtal...
what is clk/8 fuse set to?
what programming speed do you use?
can you read the chip signature?

basics:
when running at 18MHz and CLK/8 set your programming speed needs to be below:
(18/8)/4 = 562KHz

regards