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

CRC tables

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



Joined: 07 Aug 2007
Posts: 24

View user's profile Send private message

CRC tables
PostPosted: Thu Aug 23, 2007 2:29 pm     Reply with quote

Need help!

I am currently busy implementing MODBUS, but when I include my CRC tables I get a error - not enough ram available.

I am using the pic16f883
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 23, 2007 3:00 pm     Reply with quote

When you ask a question like this, you need to:

1. Tell us what Modbus driver you're using. Post the filename.
Tell us if it's the CCS driver or the one from the Code Library.
If you found it on the net, then post the link.

2. Post the first line of the CRC table declaration, that shows the size
of the elements (int8, or int16, etc.) and the number of elements
in the table.

3. Tell us if you have already enabled 16-bit RAM pointers in your
PCM compiler program (not needed for PCH). This is done with
the following statement placed just after the #include <16F883.h>:
Quote:
#device *=16


4. Tell us your compiler version.

In other words, if you're asking a detailed question, you need to give us
detailed information about the problem, and do it up front in your 1st post.
Eeprom_programmer



Joined: 07 Aug 2007
Posts: 24

View user's profile Send private message

PostPosted: Fri Aug 24, 2007 2:56 am     Reply with quote

I am not using a modbus driver, I wrote my own modbus code.
Compiler version is v4.033. I am declaring it as a static unsigned char, is there a possiblity that is can save it in the program memory?

// High Order Byte Table


static unsigned char crcTable[256] =
{
}

[/code]
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Fri Aug 24, 2007 7:49 am     Reply with quote

Eeprom_programmer wrote:
I am declaring it as a static unsigned char, is there a possiblity that is can save it in the program memory?

Yes, declare it as const and it will be stored in ROM.

Cheers, Jos
Eeprom_programmer



Joined: 07 Aug 2007
Posts: 24

View user's profile Send private message

PostPosted: Fri Aug 24, 2007 9:44 am     Reply with quote

thanks alot it fixed the problem
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Fri Aug 24, 2007 11:14 am     Reply with quote

This thread is somewhat informative.

http://www.ccsinfo.com/forum/viewtopic.php?t=18922&highlight=crc
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