Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

RE: [avr-chat] Storing table in flash

RE: [avr-chat] Storing table in flash

2008-01-12 by larry barello

Include <avr/pgmspace.h>

uint16_t CRC16_8005_TABLE[256] PROGMEM = {...};

The routines from <util/crc16.h> are extremely efficient in both space and
time.  I think you would be hard pressed to beat them even with a table
driven algorithm.

Cheers!
Show quoted textHide quoted text
-----Original Message-----
From: avr-chat-bounces+yahoo=barello.net@nongnu.org
[mailto:avr-chat-bounces+yahoo=barello.net@nongnu.org] On Behalf Of Kreyl
Sent: Saturday, January 12, 2008 1:42 AM
To: avr-chat@nongnu.org
Subject: [avr-chat] Storing table in flash

    Hi!  

  I'm  writing  table-based  crc16  calculation algoritm. So, I should
store this table somewhere.

  Is that enough:

const uint16_t CRC16_8005_TABLE [256] = {
0x0000,0x8005,0x800f,0x000a,0x801b,0x001e,0x0014,0x8011,0x8033,0x0036,0x003c
,
...
};

  Or I need to use somewhat from <avr/pgmspace.h>? If so, how should I
do that?


                                          Best regards,
                                                        Kreyl

                                          mailto: laystoll@yandex.ru
                                             ICQ: 171094105



_______________________________________________
AVR-chat mailing list
AVR-chat@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-chat

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.