View previous topic :: View next topic |
Author |
Message |
Atma
Joined: 08 Aug 2005 Posts: 22
|
adding serial number problem |
Posted: Sat Oct 22, 2005 7:01 am |
|
|
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
|
|
Posted: Sat Oct 22, 2005 10:33 am |
|
|
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
|
|
Posted: Wed Nov 09, 2005 4:58 am |
|
|
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
|
|
Posted: Wed Nov 09, 2005 9:18 am |
|
|
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 |
|
|
|