I can confirm that when that is commented out it too compiles fine this end. I have no Idea where that came from, I guess that's the problem when using previous code from existing projects or porting examples from forums and websites. Chances are a previous project required this for some reason, but with out opening every file I can't say where it came from.

Thanks for identifying this problem. Could you explain to me what this define means or does, and when it might be used.

I'll now go back over this thread and see if using the highbyte and lowbyte resolves my other issue of the case statement not changing when the blue on time value matches that of the current clock counter.

Malcolm