Have you marked the dev_status struct volatile so that the compiler is forced to re-fetch from memory the values? The example you provided didn't have this... Warner