unsigned char is unsigned character type
Volatile volatile or volatile
volatile unsigned char i;
A variable I that defines an unsigned character type.
This variable is stored in memory and needs to be removed from memory when it is used.
The general logic is "ready to use the variable----to the corresponding memory address to take the variable----with the variable", and now the compiler is involved, I put the value of I in the R register, each time from the R register to take the value, not from the inside access value. This problem arises, sometimes the value stored in the register will change unexpectedly, this time if the compiler or register value, the program will not get the expected results, or get unexpected results. Therefore, the compiler must be forced to take a value from the original address, volatile is the function, declaring that it is a variable that will be unexpectedly changed, do not let the compiler optimize it, let the compiler from the original address value
What is VU?