This might save someone some time.
I am using bit flags to control access to shared variables between the loop function and interrupt service routines. To make my code as beginner friendly as possible I used the bit functions (bitSet,bitRead,bitWrite,bitClear).
Everything works fine for my first 3 variables, but the 4th is never accessible.
The reason is very simple and if I had been paying attention I would have spotted it hours ago. The Arduino bit functions quite reasonably regard the bits in a byte as numbered 0-7, so there is no bit 8 to set.
Its obvious enough, but if you are used to using bits directly through powers of 2, you like me will have a problem.