@MarkT, @BriComp, @FrankB
Thanks for your comments relating to roll over / wrap around in MyDelay(), certainly something that needs to be taken account of in a developed program but not really relevant to the problem I'm seeing. (If you look at my code snip the call to MyDelay() was commented...