Skip to content

Instantly share code, notes, and snippets.

@krdarrah
Forked from speters/uid.ino
Last active April 1, 2024 20:25
Show Gist options
  • Save krdarrah/6e6cb94c1df015e8e9f910ae5cf85299 to your computer and use it in GitHub Desktop.
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() {
}
@Ziggy2013
Copy link

Ziggy2013 commented Aug 18, 2021

The fake atmega328p-AU chips will not enter High Voltage Parallel Programming mode. The chip just gets very hot.

I have also noticed chips marked as made in Korea (on reverse side) are often (maybe always) fake.

@pavel-perina
Copy link

pavel-perina commented Apr 1, 2024

Random SparkFun 3.3V/8Mhz piece bought in 2016 with mysterious voltage regulator marked with unidentified logo resembling wave a bit and S20G text which is suspicious on it's own:

1E	9D	95	FF	F	CE	FF	26	
FF	C	FF	17	FF	FF	57	35	
39	33	36	31	FF	5	18	28	
17	1	12	6	13	6	FF	FF

Thank you

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