View previous topic :: View next topic |
Author |
Message |
bschriek
Joined: 18 Dec 2007 Posts: 80
|
Serial Numbers by CCS Device Programmer |
Posted: Mon Mar 13, 2023 7:59 am |
|
|
I use the ICD-U64 programmer and CCS Device Programmer (CCS LOAD) to program and serialize a range of products.
Does anybody know how to integrate the Location/Address, Length(bytes), Format and the source of the serial numbers direct into the C-code?
Now every time when I start CCS LOAD I must enter these settings by hand because CCS LOAD starts with the default values.
MENU: CCS LOAD >> FILE >> SERIAL NUMBERS.
Integrating the required information above for the automatic serial numbers would be a nice feature and will prevent against mistakes like type errors.
Any suggestions are welcome,[/img] |
|
|
bschriek
Joined: 18 Dec 2007 Posts: 80
|
|
Posted: Mon Mar 13, 2023 9:14 am |
|
|
Hihi, Just read the manual!
CCS PCW 5.114
Pic16F15324
When I enter all settings in CCS LOAD by hand the serial number is programmed well.
But unfortunately the manual is clear about a serial number in the Eeprom but not in the ROM.
#serialize(dataee=0x0F09,binary=2,next="45",prompt="Put in Serial number") generated no errors after the build.
But I want to place the serial number at address 0x0F09 and 0X0F0A in the ROM.
Where can I find the right description for dataee-> data??? (ROM 1/Inst)?
I tried "datarom" and "datarm" but these commands are not recognized. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Tue Mar 14, 2023 3:10 am |
|
|
The key here is that you have to put a const variable at the required location,
then write the serial into this.
Understand that once written, you won't be able to read this as a variable,
but this makes the serialize write to the program memory instead of data
eeprom:
Code: |
#ORG 0xF09, 0xF0A
const int16 serialnum=0; //make variable two bytes
#ORG default
#serialize(id=serialnum,binary=2,next="45",prompt="Put in Serial number")
|
The compiler will place two RETLW instructions for the variable, and the
serial number will overwrite these. |
|
|
|