First time poster here, so i'll give a little bit of my background and goals: I'm a senior EE student with a decent bit of programming (mostly C++) experience and zero microcontroller experience. The arduino was recommended to me for some DIY/learning resources so i ordered my first board today! 8-)
Anyway, i'm looking to start off by doing some simple things... switching relays, reading encoders, 7segment displays, etc.
I'm just doing some research on the encoder bit and i'm having a little trouble understanding what declaring a variable as 'volatile' will get you... I have looked through the reference/example and i understand the situations WHEN you would need to use the qualifier. But i don't understand why. That is, why is it more advantageous to have certain variables declared in RAM rather than in a storage register.
Hopefully that makes sense and someone can shed some light on the topic! Thanks alot for your patience and assistance.