We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
What is the meaning of Volatile used in a variable declaration? Thank's Sergio
This is a 'C' question. Volatile tells the compiler/optimizer to not assume a variable will be the same from use to use. This stops the optimzer from loading a variable into a register and using the value there instead of re-reading the variable. It is used on any variable which may be changed in an ISR or a different thread/task in a multi-thread/task system. Best luck
memory-mapped IO variables would also need to be specified as volatile I think Keil C51 implicitly specifies volatile for SFRs?
I think Keil C51 implicitly specifies volatile for SFRs? Yep - That's correct. Jon