View previous topic :: View next topic |
Author |
Message |
Johannes
Joined: 05 Dec 2003 Posts: 10 Location: Port Elizabeth, South Africa
|
serial number |
Posted: Mon Feb 27, 2006 7:38 am |
|
|
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
|
|
Posted: Mon Feb 27, 2006 1:47 pm |
|
|
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)
|
Elegant solution |
Posted: Mon Feb 27, 2006 7:22 pm |
|
|
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
|
|
Posted: Tue Feb 28, 2006 12:37 am |
|
|
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 |
|
|
|