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 CCS Technical Support

adding serial number problem

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



Joined: 08 Aug 2005
Posts: 22

View user's profile Send private message

adding serial number problem
PostPosted: Sat Oct 22, 2005 7:01 am     Reply with quote

hi there

i am trying to add serial number to the program that i am writing. in the manual i came across

the following code:

Code:

int8 const serialNumA=100;
#serialize (id = serialNumA, next = "200", prompt = "Enter the serial number", log = "seriallog.txt")


but when i compile it, it gives me an error saying
invalid pre-processor directive.

so how exactly can i add a serial number?

I am using the PCW compiler.

thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Oct 22, 2005 10:33 am     Reply with quote

Quote:
when i compile it, it gives me an error saying
invalid pre-processor directive.

Your version of the compiler probably doesn't support #serialize.
Here is the version when CCS added support:
Quote:

3.162 Serial number support added and more advanced ICD.EXE is released


I compiled the following test program with PCH vs. 3.235, and it
compiled without error. (First, I had to take out all the spaces
that you had inserted after the equal signs and the commas.
It doesn't like those spaces).

Code:
#include <18F452.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP   
#use delay(clock=4000000)

int8 const serialNumA=100;
#serialize (id=100,next="200",prompt="Enter the serial number",log="seriallog.txt")

void main()
{

while(1);
}


Quote:
so how exactly can i add a serial number?

Use the forum's search engine to search for: serial number
Here's one of the results:
http://www.ccsinfo.com/forum/viewtopic.php?t=22666&highlight=serial+number
Atma



Joined: 08 Aug 2005
Posts: 22

View user's profile Send private message

PostPosted: Wed Nov 09, 2005 4:58 am     Reply with quote

hi there

I am using compiler version 3.148.

What i am doing is programming a PIC with another PIC and i have to add a serial number to the PIC. I have to add it from my GUI.

I tried using the #serialise stuff but i dont think that my compiler version supports it.

Is there anyway to store the serial number? would it work if i stored it in the ID locations? Does that mean i would have to write to the ID locations? If yes how can i do that?

Another thing is that is it possible to read back the serial number on the target device?

thanks in advance
Waiting in anticipation and hope.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Nov 09, 2005 9:18 am     Reply with quote

Quote:

but when i compile it, it gives me an error saying
invalid pre-processor directive.

I am using compiler version 3.148.



From CCS Compiler Version:

"3.162 Serial number support added and more advanced ICD.EXE is released"


Humberto
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