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

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

Re: [avr-gcc-list] Global variables and ISRs ???


From: Christopher X. Candreva
Subject: Re: [avr-gcc-list] Global variables and ISRs ???
Date: Tue, 6 Sep 2005 15:42:01 -0400 (EDT)

On Tue, 6 Sep 2005, Vincent Trouilliez wrote:

> Problem : on my ATmega32, after several experiments (only just started
> using it, learning...), I am suffering a big problem. It seems that when
> I declare a variable as global, then modify it within an interrupt
> routine, the 'main' function can't see that the variable has been
> modified, as if it weren't a global variable... hmmm.

You need to declare it as volatile

Search the mailing list archives, this has come up many times.

==========================================================
Chris Candreva  -- address@hidden -- (914) 967-7816
WestNet Internet Services of Westchester
http://www.westnet.com/




reply via email to

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