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

Digital Signature

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



Joined: 30 Jan 2008
Posts: 197

View user's profile Send private message

Digital Signature
PostPosted: Mon Sep 14, 2009 8:43 am     Reply with quote

Hi, I want to know if I can put a digital signature into the program memory of a pic, the signature would contain the author name of program or other data, this is possible? Question
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Sep 14, 2009 11:50 am     Reply with quote

YES you can

the question becomes do you want to be able to REPORT that to the outside world , in the event you are protecting your code ?

a common way to do this is include a documented (or not) command in the program that executes:

printf(" (c)Joe C. Blow 2009 etc etc");
Guest








PostPosted: Mon Sep 14, 2009 12:02 pm     Reply with quote

Hi asmboy, in this case my code will not be protected, I just want to place the author's
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Sep 14, 2009 12:14 pm     Reply with quote

See the first two posts in this thread. They tell how to embed the date
and time (or other information) in ROM:
http://www.ccsinfo.com/forum/viewtopic.php?t=1107
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Sep 14, 2009 12:27 pm     Reply with quote

if not protected and not printed - and not otherwise referred to
the compiler might choose in some versions to omit it

so located early in your MAIN or other function
Code:

int i;
rom char myid[9] = "Joe.Blow"; // one extra char req for \0
i=*myid;


this approach insures that it will exist in ROM and is typically to be found near or at the end of the code space

NOTE: this example is for 18f6722

you should check the LST * hex file for YOUR compiler version and selected pic to make sure it is doing what you want
Guest








PostPosted: Mon Sep 14, 2009 2:24 pm     Reply with quote

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