Go Down

Topic: Arduino Nick Gammon's board programmer does not see Arduino Mega 2560 R2 and R3 (Read 1 time) previous topic - next topic

dhenry

Quote
except Arduino Mega R2 and R3.


If you are going with a proprietary design, you need to make sure that you have good support.

Or you go with a programmer with a large / active user base.

Nick Gammon


I get the two top lines and nothing else:

Atmega chip programmer.
Written by Nick Gammon.



Sorry for the delay, I missed the notification about this thread amongst all the spam.

That message says we haven't established programming contact with the board.

I suggest you try another one of my sketches, eg, the "detect signature" sketch:

http://www.gammon.com.au/forum/?id=11633

You can alter the clock rate in those sketches, here:

Code: [Select]

// slow down SPI for benefit of slower processors like the Attiny
  SPI.setClockDivider(SPI_CLOCK_DIV64);


That is already pretty slow. I programmed a Mega at DIV4 which is much faster.

Maybe the ICSP header is not connected correctly. Try connecting the wires "directly" as per the info on my forum page.

Code: [Select]

Arduino Uno      Target Mega2560

D10 (SS)            Reset
D11 (MOSI)          D51
D12 (MISO)          D50
D13 (SCK)           D52

Gnd                 Gnd
+5V                 +5V

Nick Gammon


Or you go with a programmer with a large / active user base.


The programmer has worked fine for me, thanks anyway for the suggestion dhenry.

Perhaps the Atmel one will work better, however I've found on the Atmel web site that technical reports simply get ignored.

Nick Gammon


I had a lot of problems with fuses, resonators and crystals with Sanguinololus some time ago, maybe there is something like that here too.


If you turned off the SPIEN fuse, then programming via ICSP is now disabled. The only way to fix that (if that is the case) is to use high-voltage programming.

Conceivably you turned off SPIEN but left a bootloader there, so you can continue to use the bootloader, but not replace it.

We can confirm that. If you can upload sketches (as you say you can) then upload this:

Code: [Select]

#include <avr/boot.h>

#define SIGRD 5

void setup ()
{
Serial.begin (115200);
Serial.println ();

Serial.print ("Signature = ");

byte sig;
  sig = boot_signature_byte_get (0);
  Serial.print (sig, HEX);
  Serial.print (" ");
  sig = boot_signature_byte_get (2);
  Serial.print (sig, HEX);
  Serial.print (" ");
  sig = boot_signature_byte_get (4);
  Serial.println (sig, HEX);

Serial.println ("Fuses");
byte fuse;
 
  Serial.print ("Low = ");
  fuse = boot_lock_fuse_bits_get (GET_LOW_FUSE_BITS);
  Serial.println (fuse, HEX);
  Serial.print ("High = ");
  fuse = boot_lock_fuse_bits_get (GET_HIGH_FUSE_BITS);
  Serial.println (fuse, HEX);
  Serial.print ("Ext = ");
  fuse = boot_lock_fuse_bits_get (GET_EXTENDED_FUSE_BITS);
  Serial.println (fuse, HEX);
  Serial.print ("Lock = ");
  fuse = boot_lock_fuse_bits_get (GET_LOCK_BITS);
  Serial.println (fuse, HEX);
}

void loop () {}


Please report what that returns. We can check your fuse settings from that.

Nick Gammon

I got:

Code: [Select]

Signature = 1E 98 1
Fuses
Low = FF
High = D8
Ext = FD
Lock = EF

Go Up