avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Using flash memory for storing large look up tables


From: Royce Pereira
Subject: Re: [avr-gcc-list] Using flash memory for storing large look up tables
Date: Tue, 24 Jan 2006 15:10:32 +0530
User-agent: Opera M2/9.0 (Win32)

Hi,

There was an error in my example, corrected below!
//--------------------
unsigned todayssunset;

const unsigned sunrise[2][4] PROGMEM ={         1,2,3,4,        6,7,8,9  };

todayssunset= pgm_read_byte(&sunrise[x][y]);

Sorry, thats:

todayssunset= pgm_read_word(&sunrise[x][y]);

//-----------------
All this and more is covered in the AVR libc manual & FAQ.

--Royce.

On Tue, 24 Jan 2006 12:46:08 +0530, dhananjay deshpande <address@hidden> wrote:

Hi,
  I am learning to use AVRGCC. I am using it in AVRSTUDIO.
  I have a difficulty for my application of "sunset switch on- sunrise switch off 
relay", which requires a look up table of ~730 integers to be stored in the program. 
I do not have any other
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]