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

serial number

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



Joined: 05 Dec 2003
Posts: 10
Location: Port Elizabeth, South Africa

View user's profile Send private message Visit poster's website

serial number
PostPosted: Mon Feb 27, 2006 7:38 am     Reply with quote

Hi All,

I have a project where several devices are connected via the CAN bus to a PLC. Each device must have a unique serial number (32-bit).

Each device uses an 18F4580 running at 20MHz.

I have searched the forum and found info on the #SERIALIZE function.
Unfortunately I am using an ICD2 programmer from microchip, looks like this function only work with the CCS ICD.

Does anyone know of another method to create a unique serial number?


Compiler + IDE info
CCS PCH C Compiler, Version 3.244
MPLAB 7.21.00.00 Certified


Thanks,
Johannes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 27, 2006 1:47 pm     Reply with quote

We had this same problem. ICD2 didn't support serialization.
So I wanted to add a feature to the product so that the serial
number could be entered from the keypad and stored in EEPROM.
This would be done after programming. But we just ran out of
time for adding new features. We had to do it by hand-entering
the S/N into the source code and re-compiling each time, before
we programmed the units. On a fast machine, it compiles pretty
quickly. I think you either have to do that, or you have to spend
more money on a different programmer than ICD2.
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

Elegant solution
PostPosted: Mon Feb 27, 2006 7:22 pm     Reply with quote

Why don't you rather add a Dallas DS2401 Silicon serial number to your application. This is a one wire device that will always have a unique number. This way you do not need to worry about trying to keep track of your serial numbers so as to avoid dupications.


http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2903
Johannes



Joined: 05 Dec 2003
Posts: 10
Location: Port Elizabeth, South Africa

View user's profile Send private message Visit poster's website

PostPosted: Tue Feb 28, 2006 12:37 am     Reply with quote

Thanks PCM Programmer and hillcraft.

If I were still in the design stage of the PCB, I could have added the Dallas DS2401 as hillcraft suggested, but the hardware is already built.
I will keep this in mind for new designs. I see the serial number in this chip is 48-bit. That might cause a problem as I need a 32-bit serial number.

I will contact CCS today and get a price on the CCS ICD; otherwise I will have to do as PCM programmer suggested. Re-compile after incrementing the serial number in the source code.

Thanks again,
Johannes
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