Thanks for the suggestion, but my interrupt routine works okay. I tried it but it makes no difference. Somehow it will not run the main program, it will handle all the interrupts though.