CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Adding a serial number?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








Adding a serial number?
PostPosted: Tue Apr 26, 2005 3:01 am     Reply with quote

I seem to remember reading a way to automatically program in a unique serial number for a production run programming exercise. I have 500 products to program and don't want to compile a .hex file for each one! It's an invisible serial number which I was going to store in the program area, which could be read at service time with a reader (ICD) to confirm the printed number to the electronics board.

I use the ICD from CCS. Does anyone do anything simular?
fuzzy



Joined: 26 Feb 2005
Posts: 64

View user's profile Send private message

PostPosted: Tue Apr 26, 2005 3:08 am     Reply with quote

PonyProg has got what you need.

you can set a serial number and ponyprog will write a serial number in your mcu.

but i think it will work only for 256 numbers
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue Apr 26, 2005 4:21 am     Reply with quote

Taken from ReadMe.txt in the CCS directory:

Quote:

A new preprocessor directive has been added to make serial numbers easier
to implement. This new feature only works with the CCS ICD units. It is
implemented by inserting comments in the hex file that the ICD.EXE program
understands.

#serialize(id=xxx, file="filename.txt", listfile="filename.txt",
prompt="text", log="filename.txt", next="xxx")

id=xxx Specify a C CONST identifier, may be int8,int16,int32 or char array

Use only one of the next three options:
file="x" The file x is used to read the serial number from, and this
file is updated by the ICD programmer. It is asumed this is
a one line file with the serial number. The programmer will
increment the serial number.
listfile="x" The file x is used to read the serial number from, and this
file is updated by the ICD programmer. It is asumed this is
a file one serial number per line. The programmer will read the
first line then delete that line from the file.
next="x" The serial number X is used for the first load, then the hex file
is updated to increment x by one.

prompt="text" This option is optional. If specified the user will be prompted
for a serial number on each load. If used with one of the above
three options then the default value the user may use is picked
according to the above rules.

log="xxx" A file may optionaly be specified to keep a log of the date, time,
hex file name and serial number each time the part is programmed.
If no id=xxx is specified then this may be used as a simple log
of all loads of the hex file.

Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group