Changed interrupt code to set a flag and added a custom delay routine to check and process the desired interrupt code.