2.6 Serial Number
In Atmel ATmega328PB, each individual part has a specific serial number (also called unique device ID) to identify a specific part while it is in the field. The serial number consists of bytes, which can be accessed from the signature address space.
To read the Signature Row from software, load the Z-pointer with the signature byte address given in the following table and set the SIGRD and SPMEN bits in SPMCSR (SPMCSR.SIGRD and SPMCSR.SPMEN).
When an LPM instruction is executed within three CPU cycles after the SPMCSR.SIGRD and SPMCSR.SPMEN are set, the signature byte value will be loaded in the destination register.
The SPMCSR.SIGRD and SPMCSR.SPMEN will auto-clear upon completion of reading the Signature Row Lock bits, or, if no LPM instruction is executed, within three CPU cycles. When SPMCSR.SIGRD and SPMCSR.SPMEN are cleared, LPM will work as described in the Instruction set Manual.
Signature byte | Z-pointer address |
---|---|
Serial Number Byte 0 | 0x000E |
Serial Number Byte 1 | 0x000F |
Serial Number Byte 2 | 0x0010 |
Serial Number Byte 3 | 0x0011 |
Serial Number Byte 4 | 0x0012 |
Serial Number Byte 5 | 0x0013 |
Serial Number Byte 6 | 0x0014 |
Serial Number Byte 7 | 0x0015 |
Serial Number Byte 8 | 0x0016 |
Serial Number Byte 9 | 0x0017 |