Generate Serial Number for a FX2LP Device – KBA212789
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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.
- Tags:
- usb controllers
-
This widget could not be displayed.Anonymous