[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Data in ROM
From: |
Royce Pereira |
Subject: |
Re: [avr-gcc-list] Data in ROM |
Date: |
Sun, 23 Apr 2006 21:59:54 +0530 |
User-agent: |
Opera M2/9.0 (Win32) |
Hi,
On Sun, 23 Apr 2006 20:37:18 +0530, Abdul Malik Khan <address@hidden> wrote:
I have tried
const unsigned char mask[] = {1, 2, 4, 8, 16, 32, 64, 128};
but compiler places it in RAM istead of ROM.
---------------------------------------
Have you read the avr-libc manual & the FAQ therein?
Please read up the useful macros provided for program memory store & access!
If you would have, you would have done this:
const unsigned char mask[] PROGMEM = {1, 2, 4, 8, 16, 32, 64, 128};
And how will you access this array? Read the AVR Libc manual & the FAQ for the
answer!
--Royce.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/