Get CPU ID

Hello everyone!I would like to ask you something.
Is there a way which can someone retrieve arduino's CPU id???

Thanks in advance!

What CPU ID?

Arduino's cpu!All the id of the board.Is there something about it??

No there isn't anything to ID the board or processor.

Every Atmel CPU has a different Id. This is readable from code and has been discussed in this forum before. Search the microprocessor thread.

This is one method:

However, it isn't actually reading the signature bytes from the chip (which I don't believe is possible from a running program). Instead, the a constant is inserted at compile time.

Have a look at Nick's info here Gammon Forum : Electronics : Microprocessors : Atmega Fuse Calculator sketch

marco_c:
Have a look at Nick's info here Gammon Forum : Electronics : Microprocessors : Atmega Fuse Calculator sketch

Well yeah, that's reading them over the programming interface. I think the OP was asking how to read the Signature Bytes from within a running program.

The code that Nick has is just a sketch. That is just a running program...

I used it to read the signature bytes for an ATTiny that was not in his table - I don't have any special high voltage cables/tools or interfaces.

marco_c:
I used it to read the signature bytes for an ATTiny that was not in his table - I don't have any special high voltage cables/tools or interfaces.

Running on the ATtiny itself?

Nick's article clearly says:
"Basically you connect up the board with the sketch, to the target board, with 6 wires, along these lines"

I have a sketch that self-detects the signature:

#include <avr/boot.h>

#define SIGRD 5

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

Serial.println ("Signature");

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

Serial.println ("Fuses");
byte fuse;
  
  fuse = boot_lock_fuse_bits_get (GET_LOW_FUSE_BITS);
  Serial.println (fuse, HEX);
  fuse = boot_lock_fuse_bits_get (GET_HIGH_FUSE_BITS);
  Serial.println (fuse, HEX);
  fuse = boot_lock_fuse_bits_get (GET_EXTENDED_FUSE_BITS);
  Serial.println (fuse, HEX);
  fuse = boot_lock_fuse_bits_get (GET_LOCK_BITS);
  Serial.println (fuse, HEX);
}

void loop () {}

If that helps.

I think what we need to be asking OP is why he/she thinks it is necessary to do such a thing. If the objective is to load the same sketch on several Arduinos and have each Arduino perform differently, there are other (better?) ways to accomplish this.

Hi guys,
following this sketch for read out the cpu-id:
http://forum.arduino.cc/index.php?topic=113067.msg850597#msg850597
I tried out with 3pcs Arduino Mega. And surprise: All 3 have the same ID!
What is wrong? I don't check. Result is 3x the same:

[color=blue]Signature
1E-98-1
Fuses
FF-D8-FD-FF[/color]

best regards
realerhanno

realerhanno:
I tried out with 3pcs Arduino Mega. And surprise: All 3 have the same ID!
What is wrong? I don't check. Result is 3x the same:

There isn't a unique id/serial number in the chips.

The signature bytes identify the CPU type, so of course they will all be the same.

In the 2560's datasheet, section "30.3 Signature Bytes" includes a table for similar devices.

0x1E, 0x98, 0x01 identifies it as a ATmega2560