Tony, in the next case (i==2), the PTBD5 is turned back off, so I dont see the minor bug??
As far as debugging, yes I can step through the code in the debugger, I do a run from point at the beginning of the interrupt handler, I can step through and see it execute each time, the middle case (i==1) is never executed. Yes i is initialized as a global variable before the handler routine.
Thank you for helping a noobie! I am more familiar with C development on the Atmel AVR series, but these processors seem more powerful and are considerably cheaper too.
Aaron