C8051F39x/37x
18. Device ID Registers
The C8051F39x/37x has SFRs that identify the device family and derivative. These SFRs can be read by
firmware at runtime to determine the capabilities of the MCU that is executing code. This allows the same
firmware image to run on MCUs with different memory sizes and peripherals, and dynamically changing
functionality to suit the capabilities of that MCU.
In order for firmware to identify the MCU, it must read two SFRs. DERIVID describes the specific derivative
within that device family, and REVID describes the hardware revision of the MCU.
The C8051F39x/37x devices also include four SFRs, SN0 through SN3, that are pre-programmed during
production with a unique, 32-bit serial number. The serial number provides a unique identification number
for each device and can be read from the application firmware. If the serial number is not used in the appli-
cation, these four registers can be used as general purpose SFRs.
SFR Definition 18.1. DERIVID: Device Derivative ID
Bit
7
6
5
4
3
2
1
0
DERIVID
R
Name
Type
Reset
Varies
Varies
Varies
Varies
Varies
Varies
Varies
Varies
SFR Address = 0xAB; SFR Page = 0
Bit
Name
Function
7:0
DERIVID
Derivative ID.
This read-only register returns the 8-bit derivative ID, which can
be used by firmware to identify which device in the product family
is being used.
0xD0: C8051F390
0xD1: C8051F391
0xD2: C8051F392
0xD3: C8051F393
0xD4: C8051F394
0xD5: C8051F395
0xD6: C8051F396
0xD7: C8051F397
0xD8: C8051F398
0xD9: C8051F399
0xE0: C8051F370
0xE1: C8051F371
0xE4: C8051F374
0xE5: C8051F375
Preliminary Rev. 0.71
95