10

I'd like a couple of Atmega328s to run the same program, but they're going to interface with each other and need unique IDs. Is there any such ID or serial number hard-coded on the chip?

Andreas
  • 713
  • 2
  • 13
  • 21
  • 1
    I believe people sometimes include an external 1-wire device in their circuit/PCB for this purpose, since they all have unique IDs. I think the USB capable AVRs have an ID. – RedGrittyBrick Jul 11 '13 at 10:55

2 Answers2

9

The Atmega328 does not come with a hard coded UID (unlike the XMEGA and the Atmel 32-bit devices)

From what i understand you want to use some kind of unique ID for dressing purposes. I can think of some options that may meet your requirements.

  1. Select a unique address by setting some external jumpers on dedicated I/Os.
  2. Program a UID to flash or EEPROM during production.
  3. Interface an external chip that provides a UID.
  4. Make the address configurable by software (UART debug interface for example).
Nick Alexeev
  • 37,739
  • 17
  • 97
  • 230
Rev
  • 10,017
  • 7
  • 40
  • 77
  • 1
    N.B.: here's a dallas/maxim chip that does it: http://www.maximintegrated.com/en/products/digital/memory-products/DS2401.html – zmo Apr 21 '15 at 13:49
3

The ATMEGA328PB variant has a unique 9-byte serial number in each chip...

enter image description here

bigjosh
  • 9,888
  • 29
  • 48
  • ...and a second hardware UART, though that requires board changes to use, while just accommodating the chip to get the serial number might work with silkscreen-over-pads or care never to drive them in conflict. – Chris Stratton Sep 21 '17 at 14:43
  • I think all the new pin assignments are where Vcc and Gnd pins used to be. As long as your software does not use these new pins (I.E. set the DDR bits), then they should stay in the default high imedeance mode and not cause any problems if left connected to Vcc and Gnd. – bigjosh Sep 22 '17 at 03:25