Tony, Is what you are showing us the complete code? Do you have any interrupts enabled?