Page 1 of 1
Array im Flash erstellen ? - Flowcode 5 AVR
Posted: Fri Aug 24, 2012 2:23 pm
by wfly31
Wie kann ich im Flash ein Array (Lock up Table) erstellen ?
Gruß wfly
Re: Array im Flash erstellen ? - Flowcode 5 AVR
Posted: Fri Aug 24, 2012 2:40 pm
by Enamul
Hallo,
Sie können den folgenden ausgezeichneten Beitrag von Martin ...
http://www.matrixmultimedia.com/mmforum ... hp?p=31507 # p31507
Re: Array im Flash erstellen ? - Flowcode 5 AVR
Posted: Wed Aug 29, 2012 1:41 pm
by wfly31
Der Beitrag von Martin bezieht sich auf den Code für PIC.
Hier das Beispiel für AVR
Beim AVR muss unter "Projekt Options" im Feld "Definitions and function declarations:" der Code
"#include <avr/pgmspace.h>" eingetragen werden
Und unter "Function implementations:"
const uint16_t Variablenname[] PROGMEM =
{65281,65028,64777,64528,64281,64035,63792,63550,
63310,63072,62836,62602,62369,62138,61909,61681,
61455,61231,61008,60787,60568,60350,60133,59919};
Das Auslesen der Tabelle erfolgt in einem C-Element:
VAR=Variablenname[INDEX];