about arrays

4 views
Skip to first unread message

klaine8

unread,
Dec 8, 2009, 5:49:19 PM12/8/09
to PIC32-Basic, kla...@gmail.com
Hi,

I need to do a CRC routine and I am porting one over.

here is the C source code.

static const unsigned short crc16tab[256]= {
0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7,
0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef,
0x1231,0x0210,0x3273,0x2252,0x52b5,0x4294,0x72f7,0x62d6,
0x9339,0x8318,0xb37b,0xa35a,0xd3bd,0xc39c,0xf3ff,0xe3de,
0x2462,0x3443,0x0420,0x1401,0x64e6,0x74c7,0x44a4,0x5485,
0xa56a,0xb54b,0x8528,0x9509,0xe5ee,0xf5cf,0xc5ac,0xd58d,
0x3653,0x2672,0x1611,0x0630,0x76d7,0x66f6,0x5695,0x46b4,
0xb75b,0xa77a,0x9719,0x8738,0xf7df,0xe7fe,0xd79d,0xc7bc,
0x48c4,0x58e5,0x6886,0x78a7,0x0840,0x1861,0x2802,0x3823,

I did not find in PIC32 basic documentation how to do it.
I would rather not have to store each value individually.

Thanks for any help.

Best Regards
Kari

klaine8

unread,
Dec 8, 2009, 5:49:19 PM12/8/09
to PIC32-Basic, kla...@gmail.com

peter247

unread,
Dec 9, 2009, 5:54:06 PM12/9/09
to PIC32-Basic
Hi Kari

Not a lot of use , have you the C code it generates ?
What are you doing ? , testing the data from the card is error free ?

Kari Laine

unread,
Dec 10, 2009, 2:48:13 AM12/10/09
to pic32...@googlegroups.com
On Thu, Dec 10, 2009 at 12:54 AM, peter247 <peter...@gmail.com> wrote:
> Hi Kari
>
> Not a lot of use , have you the C code it generates ?
> What are you doing ? , testing the data from the card is error free ?

I try to do xmodem sending for BV513.
It is a learning exersice

Kari
Reply all
Reply to author
Forward
0 new messages