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

autoindexing

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



Joined: 04 Jun 2008
Posts: 23

View user's profile Send private message

autoindexing
PostPosted: Fri Jan 05, 2018 12:29 pm     Reply with quote

Hello!
Is some one that knows how can be done an autoindexing at each programing?
For example is a simple code that has the serial on two unsigned chars 00 and 01.
Can be done with Pickit3 that at every programing these unsigned chars to autoincrement? 00-01, 00-02, 00-03, ...00-FF, 01-00, 01-01,etc...?
Ttelmah



Joined: 11 Mar 2010
Posts: 12656

View user's profile Send private message

PostPosted: Fri Jan 05, 2018 3:05 pm     Reply with quote

Look at #serialize.
Normally you only change one value though. Not sure how it'd handle multiple values.
temtronic



Joined: 01 Jul 2010
Posts: 5830
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jan 06, 2018 6:27 am     Reply with quote

As Mr. T says...
perhaps use the 'string' option AND 4 bytes(ABCD).
You could then parse the variable into 'high word'( AB), 'low word'(CD).

While I've never used it, a quick test should prove if it'll do what you want to accomplish.

Jay
lboghy



Joined: 04 Jun 2008
Posts: 23

View user's profile Send private message

PostPosted: Wed Jan 10, 2018 2:07 am     Reply with quote

Thank you very much. I will try and inform you.
Regards.
RF_Developer



Joined: 07 Feb 2011
Posts: 820

View user's profile Send private message

PostPosted: Wed Jan 10, 2018 6:15 am     Reply with quote

This is not a function of the PIC, or of the programming hardware, e.g. Pickit3. Its done by the PC programming software. CCSLoad, used with CCS programmers such as the U64, Load-n-Go and so on, does automated serialization. You need your code to be set up to accept a serial number. With CCS C you use #serialize in conjunction with the automatic serial numbering on the programming application.

Serial numbers tend, for a number of reasons to get big surprisingly quickly, and if its a commercial application they may well have to fit in with someone else's sequence. Also they may not be numbers at all. I usually use 8 characters, which allow alphanumeric serial numbers, however for my purposes automatic numbering is not possible. For a start the numbers I have to use are allocated company wide and are not sequential when at programming. Also they are not usually the serial number of the PIC, or even the PCB or PCB assembly on which the PIC is mounted. Instead they are usually of the system into which the PCB assembly (usually an embedded controller of some kind) is later fitted. That means I've never used programming time serialisation at all.
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