Hi anyone...
i have the following function being called from INSIDE a timerA ISR on a MSP430F6736 every 100mS.
In that function, var keyIsPressed is a global declared as "uint8_t keyIsPressed[4][3]" and only 1 element ever has a value (1..4) at any one time (so the remaining matrix elements would be zero).
With Version A, calling this function causes a later function in the same ISR to execute 500ms later, whereas with version B the later function executes a few micro secs later.
What i do not understand is why there should be ANY difference in execution time....ie, what is it that when i have the 2 compares in version A it takes 500ms yet switching the compares around in version B and thus executing only 1 compare only results in a few micro secs....i would have expected both versions to just take a few micro secs.
(i realise i could improve this by just saving the one element's value, but the app will be catering for more than 1 element having a value)
VERSION A:
uint8_t keyIsPressed[4][3];
VERSION B:
thanks in advance....