View previous topic :: View next topic |
Author |
Message |
Eeprom_programmer
Joined: 07 Aug 2007 Posts: 24
|
CRC tables |
Posted: Thu Aug 23, 2007 2:29 pm |
|
|
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
|
|
Posted: Thu Aug 23, 2007 3:00 pm |
|
|
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>:
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
|
|
Posted: Fri Aug 24, 2007 2:56 am |
|
|
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
|
|
Posted: Fri Aug 24, 2007 7:49 am |
|
|
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
|
|
Posted: Fri Aug 24, 2007 9:44 am |
|
|
thanks alot it fixed the problem |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
|
|