View previous topic :: View next topic |
Author |
Message |
lboghy
Joined: 04 Jun 2008 Posts: 23
|
autoindexing |
Posted: Fri Jan 05, 2018 12:29 pm |
|
|
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...? |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19382
|
|
Posted: Fri Jan 05, 2018 3:05 pm |
|
|
Look at #serialize.
Normally you only change one value though. Not sure how it'd handle multiple values. |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9177 Location: Greensville,Ontario
|
|
Posted: Sat Jan 06, 2018 6:27 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
lboghy
Joined: 04 Jun 2008 Posts: 23
|
|
Posted: Wed Jan 10, 2018 2:07 am |
|
|
Thank you very much. I will try and inform you.
Regards. |
|
![](templates/subSilver/images/spacer.gif) |
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Wed Jan 10, 2018 6:15 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
|