On Tue, Jul 22, 2014 at 11:13:58PM -0500, Richard R. Pope wrote: > I don't understand volatile in this reference. Since this is a > global variable isn't auto fine? It depends on your compiler. "volatile" means that the variable can change spontaneously, independently of the flow of execution of the code that uses it. I don't know about your compiler. I don't use your compiler. But for the common dialects of C the distinction expressed by volatile is useful. http://en.wikipedia.org/wiki/Volatile_variable#Example_of_memory-mapped_I.2= FO_in_C is a section of the Wikipedia article that shows how important the keyword is. I was unable to relate the rest of your reply to my reply. Please use an interleaved style next time. http://en.wikipedia.org/wiki/Posting_style#Interleaved_style Your new code still has the same timer reload constant in three places, so it will be fun for you to debug why it doesn't seem right when you forget to change all three places. I think your claims about style show fundamental misunderstandings that I'm not willing to contest, so I won't try to comment on your style again. I'd hate to have to maintain this code, and if I was paid to do it the first thing I'd do is rewrite it, with peer review every step of the way. But I recognise that some code is intentionally obfuscated for business or personal reasons. --=20 James Cameron http://quozl.linux.org.au/ --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .