A convenient way to check program version

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DeTo_1826166
Level 3
Level 3
First like received First like given

Hello,

   

We use some Microchip PIC and we found very convenient to check the program version directly into EEPROM (For exemple our program write 16.0A directly into EEPROM just after his first use). It's really commodious for the after sale service, because we can program the same device with multiple versions.

   

I'm new to PSOC 4 and i just don't find a way to do the same thing with (by using the MiniProg3 programmer).

   

What i want  is a solution to know the downloaded program version inside the PSOC4.

   

 

   

Thanks for your answers.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum.

   

Try a

   

const uin8 MajorVersion = 1;

   

const uint8 MinorVersion = 0x04;

   

or similar. Both of these values will be allocated in flash.

   

 

   

Bob

View solution in original post

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum.

   

Try a

   

const uin8 MajorVersion = 1;

   

const uint8 MinorVersion = 0x04;

   

or similar. Both of these values will be allocated in flash.

   

 

   

Bob

0 Likes
DeTo_1826166
Level 3
Level 3
First like received First like given

Thanks!

   

Hm ok, but it's not clear for me how fix the flash memory location inside the program, i dislike the way to do it through linker.. And i m not sure to be sure that this will not be override.

   

I have a little to much my mind PIC oriented i think 😕

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Imho there is no need to fix the location of the program version to a defined address. The version is fixed to the name of a variable or struct or whatever you choose.

   

 

   

Bob

0 Likes
DeTo_1826166
Level 3
Level 3
First like received First like given

Then i don't see how i can read it with a Pickit 3 programmer 😞

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

See here : http://stackoverflow.com/questions/682697/fixed-address-variable-in-c

   

You can attach with Miniprog3 and inspect memory locations.

   

 

   

Bob