C8051F99x-C8051F98x
2 Rev. 1.2
4. Determining the Device Part Number at Run Time
In many applications, user soft ware may ne ed to de termin e the MCU p art num ber at run time in order to deter mine
the hardware capabilities. The part number can be determined by reading the value of the DEVICEID Special
Function Register. The value of the DEVICEID register can be decoded as follows:
0xD3—C8051F980-C
0xE3—C8051F980-C1
SFR Page = 0xF; SFR Address = 0xE3
5. Unique Identifier (UID) (C8051F980-C1-GM only)
The C8051F980-C1-GM has a pre-programmed 32-bit (4-byte) Unique Identifier (UID). The UID resides in the last
four bytes of XRAM. The UID can be read by firmware using MOVX instructions and through the debug port.
Firmware can overwrite the UID during normal operation, and the bytes in memory will be automatically reinitialized
with the factor y-prog ram med UID valu e after any de vice re set. Firmware using this area of memory should always
initialize the memory to a known value, as any previous data stored at these locations will be overwritten and not
retained through a reset.
SFR Definition 4.1. DEVICEID: Device Identification
Bit76543210
Name
DEVICEID[7:0]
Type
R/W
Reset
00000000
Bit Name Function
7:0 DEVICEID[7:0] Device Identification.
These bits contain a value that can be decoded to determine the device par t
number.
Table 5.1. UID Implementation Information
Device External Memory (XRAM) Addresses
C8051F980-C1-GM (MSB) 0x00FF, 0x00FE, 0x00FD, 0x00FC (LSB)