View previous topic :: View next topic |
Author |
Message |
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
#serialize |
Posted: Tue Feb 28, 2006 6:49 am |
|
|
Code: | #serialize(id=serialNumA,next="0001",prompt="Enter the serial number",log="C:\Program Files\PICC\Examples\timed Pulse\Pulse_Timed_serial.log")
|
the above code works OK, I am using the 18F1320 with the last ROM location of 0001FFF. int32 serialNumA;
when I run the serialize as above and have a serilize code of say "99999999" I get from 1FFFE = FF, 1FFFF=E0, 20000 = F5, 20001 = 05. I can not find where the serial number has gone, any idears _________________ What has been learnt if you make the same mistake? |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Feb 28, 2006 7:30 am |
|
|
How did you declare serialNumA? I assume you declared this as an int8 just as in the example code and then a value of 99999999 won't fit. Try an int32 instead. |
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Tue Feb 28, 2006 8:06 am |
|
|
declared as int32 serialNumA; even tried const int32 serialNumA;
however I found using the ee data I could get it to work
Code: | #serialize(dataee=0xf0,string=11,next="1",prompt="Put in Serial number",log="C:\Program Files\PICC\Examples\timed Pulse\Pulse_Timed_serial.log") |
writing to eeprom from address 0xf0 all works OK, I can see the data. I will use this methode for now
Andrew _________________ What has been learnt if you make the same mistake? |
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Tue Feb 28, 2006 7:06 pm |
|
|
A question on the serilize numbering, Can we include Alpha and numeric serial numbering if so How can we do this with #serialize, if not can this feture be added for future developments.
I wanted to be able to include Unit, version type, time/date as well the serial number.
Andrew _________________ What has been learnt if you make the same mistake? |
|
|
|