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 Numbers by CCS Device Programmer

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



Joined: 18 Dec 2007
Posts: 76

View user's profile Send private message Send e-mail

Serial Numbers by CCS Device Programmer
PostPosted: Mon Mar 13, 2023 7:59 am     Reply with quote

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: 76

View user's profile Send private message Send e-mail

PostPosted: Mon Mar 13, 2023 9:14 am     Reply with quote

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: 19195

View user's profile Send private message

PostPosted: Tue Mar 14, 2023 3:10 am     Reply with quote

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.
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