Array im Flash erstellen ? - Flowcode 5 AVR

Support-Forum für Deutschsprachige, die in ihrer Muttersprache schreiben möchten.

Moderator: Benj

Post Reply
wfly31
Posts: 4
Joined: Fri Aug 24, 2012 2:14 pm
Contact:

Array im Flash erstellen ? - Flowcode 5 AVR

Post by wfly31 »

Wie kann ich im Flash ein Array (Lock up Table) erstellen ?

Gruß wfly

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Array im Flash erstellen ? - Flowcode 5 AVR

Post by Enamul »

Hallo,
Sie können den folgenden ausgezeichneten Beitrag von Martin ...
http://www.matrixmultimedia.com/mmforum ... hp?p=31507 # p31507
Enamul
University of Nottingham
enamul4mm@gmail.com

wfly31
Posts: 4
Joined: Fri Aug 24, 2012 2:14 pm
Contact:

Re: Array im Flash erstellen ? - Flowcode 5 AVR

Post 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];

Post Reply