Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Generate Serial Number for a FX2LP Device – KBA212789

lock attach
Attachments are accessible only for community members.

Generate Serial Number for a FX2LP Device – KBA212789

Anonymous
Not applicable

Version: *A

Translation - Japanese: FX2LPデバイスのシリアル番号を生成 – KBA212789 - Community Translated (JA)

Question:

How do I generate a serial number for a FX2LP Device?

Answer:

The serial number is used to identify the devices. By using this, every device will have a unique number that helps in differentiating the FX2LP parts easily. It can be generated in two ways.

1. By adding a Serial Number string in the Descriptor File (dscr.a51 file).

SerialNum:

      db SerialNum-SerialNumend      ;; Descriptor length

      db DSCR_STRING

      db 00,00        .

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

      db 00,00

SerialNumEnd:  

In the first column, you can enter a number of your choice. One of the drawbacks with this method is that you need to manually enter the serial number for every device.

2. Generate a unique serial number by writing a function in firmware. The FX2LP has got six registers that is unique for each FX2LP device. The string descriptor is updated with the contents of these registers to generate a unique serial number for every FX2LP device connected. Please refer to the attached firmware project (InsertSerialNumber() function block) for the implementation.

Attachments
651 Views
Contributors