0

Hi anybody know how to get ATMEL unique ID from Atmega microcontroller?

I read this question but the code in answer not work in Atmel Stadio.

Edit:

Because we produce about 1000 board per week I want to a way that find our board in a project with broadcast a message to them and they replay a Uniq code that we could identify them.

Ali
  • 183
  • 5
  • 14
  • The unique ID is likely a feature of Atmel's other processor lines like the SAM series (ARM cores) mentioned at your link, not the ATmega series. But you can put a unique serial number in each device you program by adjusting the program as you load it, or using "serialization" capability in production programmers. Fair warning: it's easy to get wrong, so thoroughly test the process before you do many, and especially across byte boundaries. – Chris Stratton May 02 '17 at 05:51
  • yes its a way that put a serial in our program but we produce 1000 board per week and it too hard to manage uniqe code...i search for better soulotion – Ali May 02 '17 at 05:59
  • Some of the Arm parts are price competitive, but with care unique codes shouldn't really be an issue to assign. It's all about knowing your tools and filling any gaps in manufacturer capability with scripts... not really very hard to dynamically change a hex file for example. If you are constrained in number space you can just use a new starting "block" each time you program a batch and don't worry about the gaps you skip. – Chris Stratton May 02 '17 at 06:09
  • I don't know... Read the datasheet? – marcelm May 02 '17 at 10:36
  • Some newer atmega parts do have a real unique serial number, like the atmega88pb. It's stored in one of the registers on the chip. In the atmega88pb, it's 9 bytes long – BeB00 May 02 '17 at 10:36
  • then all of atmega micro dont have uniq id ? – Ali May 02 '17 at 10:41
  • 1
    No, the majority dont – BeB00 May 02 '17 at 10:41
  • if you have for example 100 board in a one bus, choose witch way to find and identify each of them? – Ali May 02 '17 at 10:43
  • You'll have to program a way to do that yourself if they dont have their own unique id. Avrdude allows you to set a program counter, i used a batch file to turn this into a device identifier, i think the command line option was Y – BeB00 May 02 '17 at 10:51
  • do you know a tutorial or that help about your referred batch file? – Ali May 02 '17 at 11:09

0 Answers0