problem to add third user in program PR8.

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

Re: problem to add third user in program PR8.

Postby syukrikasim » Fri Dec 02, 2011 12:16 am

thank you to you all bcoz help me..the latest version of HI-TEC is answer for my problem..thank you very much
syukrikasim
Freshie
 
Posts: 7
Joined: Tue Nov 29, 2011 6:16 pm

Re: problem to add third user in program PR8.

Postby syukrikasim » Fri Dec 02, 2011 2:08 am

I can successfully build the original code on MPLAB 8.20 with Hi-Tech Universal Toolsuite 9.83.
I can add up to 8 IDs and 8 user names before the data memory full. but i cant add more than 8...at least i need 12 IDs and 12 user name in this program...how to fix this problem..help me..
syukrikasim
Freshie
 
Posts: 7
Joined: Tue Nov 29, 2011 6:16 pm

Re: problem to add third user in program PR8.

Postby ZaM » Fri Dec 02, 2011 5:30 am

sich WROTE:I can successfully build the original code on MPLAB 8.80 with Hi-Tech Universal Toolsuite 9.83.
I can add up to 8 IDs and 8 user names before the data memory full.
After I reduced the user name array to only 3 characters, 12 IDs and 12 user names can be added.
For higher data memory space, you may need to get other MCU model.


tu sich dah bagi jawapan, guna nama 3 huruf je, eg:ali,abu,man,dan epi
ZaM
Moderator
 
Posts: 78
Joined: Tue Nov 23, 2010 4:16 pm

Re: problem to add third user in program PR8.

Postby shahrul » Fri Dec 02, 2011 8:56 am

You can upgrade to Hi-Tech Pro Mode for 45 days.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: problem to add third user in program PR8.

Postby sich » Fri Dec 02, 2011 10:34 am

Just declare the string as constant - "const" to save RAM space.

Original code that uses RAM space:
CODE: SELECT_ALL_CODE
unsigned char id_1[10]={"0002393929"};    //define the Tag ID here
unsigned char id_2[10]={"0000797447"};    //change this ID to the tag ID that user want to read

unsigned char user_1[10]={"Joseph "};   //define the Tag user here
unsigned char user_2[10]={"Mary "};   //change this user name to the tag


Modified code that uses Program Memory by adding "const":
CODE: SELECT_ALL_CODE
const unsigned char id_1[10]={"0002393929"};    //define the Tag ID here
const unsigned char id_2[10]={"0000797447"};    //change this ID to the tag ID that user want to read

const unsigned char user_1[10]={"Joseph "};   //define the Tag user here
const unsigned char user_2[10]={"Mary "};   //change this user name to the tag


That'll free up your RAM...
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Previous

Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 12 guests