At 07:36 PM 6/8/2008 -0500, David Kelly wrote: >On Jun 8, 2008, at 7:00 PM, Cat Hotmail wrote: > > > I'm not sure of all that "volatile" does (I know I need it for > > variables > > that I use both in interrupts and out). > > >Volatile informs the compiler that the object may change between the >compiler's uses. It's a little more than that. That's certainly much of the intent. What it actually means though is that access to a volatile variable must take place in the order they are specified and exactly as many times as is specified. That's why a volatile write only variable makes sense. As a consequence of that it gives the behaviour you describe. It will not deal with issues like hardware caches but that's not a concern on AVRs anyway. Robert "C is known as a language that gives you enough rope to shoot yourself in the foot." -- David Brown in comp.arch.embedded http://www.aeolusdevelopment.com/
Message
Re: [AVR-Chat] AvrStudio4 (2008), WinAVR (2007-05...) and Dragon problem debugging C code (jtag)
2008-06-09 by Robert Adsett