[avr-gcc-list] Data in ROM
Hi All, I want to define a constant array that should not be copied into the RAM during initialization. How should I define such an array? I have tried const unsigned char mask[] = {1, 2, 4, 8, 16, 32, 64, 128}; but compiler places it in RAM istead of ROM. Thanks-- Abdul Malik Khan ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] Using PORTB with variables, PORTB = var
Hi, what is the type and size of var? What error you are geting? On 4/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hiyas,How can I use the PORTB constant with variables? eg: while (1) {var = 1;PORTB = var}That is what I'm trying to acheive.I'd like to be able to do it with variableslike I do above, but it doesn't seem to work.Once I replace var with an actual number, it works as expected.Can someone help me out here?URL? reference?Thanks,Chris-___AVR-GCC-list mailing list AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list-- Abdul Malik Khan ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] Interrupt Service Routines
Try void SIG_OVERFLOW0 (void) __attribute__ ((signal)); //Prototype of the ISR void SIG_OVERFLOW0 (void) { // ISR Code will be here} Hope it will work On 4/5/06, Dave Lamont [EMAIL PROTECTED] wrote: Can somebody advise me how to write thereplacementof SIGNAL(SIG_OVERFLOW0)I have tried various combinations ofinterrupt (TIMER0_OVF) void TIMER0_OVF(void){etc;etc;etc}Thank you in anticipation David Lamont comtec___AVR-GCC-list mailing listAVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list-- Abdul Malik Khan ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list