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

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

Re: [avr-gcc-list] Const lookup table


From: Sander Pool
Subject: Re: [avr-gcc-list] Const lookup table
Date: Fri, 19 Apr 2002 09:51:26 -0700

That's pretty slick. I'm thinking of using a mega128 to create sound (speech
to be exact) and I was thinking I could store quite a few small samples in
flash memory.

Does avrgcc take care of the 64 KB boundary automatically or do I need to
specify in which segment the tables go?

This is cool stuff! Of course I'd first have to make the m128 avrgcc work on
windoze :-)

    Sander

----- Original Message -----
From: "Peter Bosscha" <address@hidden>
To: <address@hidden>; <address@hidden>
Sent: Friday, April 19, 2002 5:11 AM
Subject: Re: [avr-gcc-list] Const lookup table


> Hi Andries,
>
> There you go:
>
> void ASSIGN_Relay(unsigned char Number)
> {
>  volatile unsigned char Relay_select = 0;
>     static unsigned char PROGMEM Lookup_relay [16] = {
>       0x06, 0x05, 0x07, 0x00, 0x02, 0x04, 0x01, 0x03,
>       0x03, 0x01, 0x04, 0x02, 0x00, 0x07, 0x05, 0x06
>       };
> }
>
> Of course you'll have to use PRG_RDB to get your variables (!)
>
> Regards
> Peter Bosscha
>
>
> >>> Andries Posthumus <address@hidden> 04/19/02 12:15PM
> >>>
> Hi all
>
> Please help, I would like to use a lookup table, in a subroutine. I
> don't
> want to store the lookup table in RAM, how can store it in program
> memory
>
> void ASSIGN_Relay(unsigned char Number)
> {
>  volatile unsigned char Relay_select = 0;
>     static unsigned char Lookup_relay [16] = {
>       0x06, 0x05, 0x07, 0x00, 0x02, 0x04, 0x01, 0x03,
>       0x03, 0x01, 0x04, 0x02, 0x00, 0x07, 0x05, 0x06
>       };
> }
>
> Andries Posthumus
>
>
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org



reply via email to

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