|
||||||||
|
MCU User Forum
![]() MCU User Forum
![]() Automatically assigning Serial Numbers
|
| next newest topic | next oldest topic |
| Author | Topic: Automatically assigning Serial Numbers |
|
jcb095 New Member |
I am using the C8051F320 micro and I would like to automatically assign each micro with a Serial number. What is the best way to accomplish this? Thanks in advance. IP: Logged |
|
ReneK Member |
This is what I do: I wrote a simple serial number genrator that fits my needs (it simply generates the number and writes it as serial number descriptor into an asm or c file). Production programming is done by a small script. This script I don't know if this is the best way, but it is good enough for me. IP: Logged |
|
jeremy New Member |
Give your serial number an absolute location in code space (using the _at_ keyword), then after you program the micro, you can use the Flash Utils DLL to set your serial number. Alternatively, a serial number generator could generate a HEX file to program the serial number into the right place. IP: Logged |
|
Tsuneo Member |
- The code FLASH is erased to 'FF' in this MCU. And when the data written to it is 'FF', no write procedure is actually performed to that byte, it remains 'FF'. - "Flash program utilities" can 'overwrite' a range of the code FLASH without erasing other part. a) Fill the range to be replaced with 'FF' on the original firmware. // string descriptor for serial number: ABC12345 b) Locate the range on the code FLASH after linking it. - find its address on the linker map - confirm it with the IDE 'Tools' menu > 'Upload memory to file', after loading the firmware to the MCU. c) Using the "Flash program utilities", overwrite the address in the serial number. Anyway you need a 'serial number generator' program. Tsuneo IP: Logged |
|
frief Member |
Ideally someone would implement this for srecord: http://sf.net/projects/srecord/ or more specifically ![]() http://sourceforge.net/tracker/index.php?func=detail&aid=776221&group_id=72866&atid=535953 IP: Logged |
|
erikm Member |
why not include a Dallas DS2411? Erik IP: Logged |
|
stoyanmihaylov New Member |
Some time ago I and one my colegue did something similar. I made loader (using supplied DLLs), this loader had connection to MySQL. It did couple of things: 1. Connect to MySQL 2. Get bootloader.hex 3. Create and get unique.hex 4. Loads all code To have unique number, I am printing small labels with unique number which are something like 1a22w - and I am using barcodes also to automate whole proces. Meaning - I refuse to load code without unique number. And number is unique - MySQL can guarantee it. I used this technique to load unique key for criptography. IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() |
|
Have you seen our MCU Knowledge Base?
|
| |||||
|
| |||||