Skip to content

Instantly share code, notes, and snippets.

@krdarrah
Forked from speters/uid.ino
Last active November 12, 2025 11:15
Show Gist options
  • Select an option

  • Save krdarrah/6e6cb94c1df015e8e9f910ae5cf85299 to your computer and use it in GitHub Desktop.

Select an option

Save krdarrah/6e6cb94c1df015e8e9f910ae5cf85299 to your computer and use it in GitHub Desktop.
Arduino atmega328p unique id/serial number
//found this code here
//https://gist.github.com/speters/f889faec42b510052a6ab4be437d38ca
//Purpose is to simply run a memory check on ATMEGA238P to test for counterfeit parts
#include <avr/boot.h>
#define SIGRD 5
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("");
Serial.println("boot sig dump");
int newLineIndex = 0;
for (uint8_t i = 0; i <= 0x1F; i += 1) {
Serial.print(boot_signature_byte_get(i), HEX);
Serial.print("\t");
newLineIndex++;
if (newLineIndex == 8) {
Serial.println("");
newLineIndex = 0;
}
}
Serial.println();
}
void loop() {
}
@razvitm
Copy link

razvitm commented Nov 12, 2025

Atmega328PB AU with just -U marking, which enters high voltage parallel programming with Nick Gammon's tutorial and schematic, so probably genuine, boot signature:
1E 56 95 1E 16 1 A5 A5
FF 55 FF D3 FF 96 56 30
56 4C 49 50 69 13 20 28
17 6 12 B 13 B FF FF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment