Jan-Erik, Do I put the interrupt routine in side main() and then put the=20 while() inside the interrupt routine, inside the while loop or inside=20 the for loop? I haven't had time to read 5.9.x yet and I am getting very=20 tired. I'm going to go to sleep within the next hour and I won't have=20 any choice in the matter as I have taken my sleep pill. I have also been=20 up about 16 hours. I would like to complete this last step. Your=20 information about how to use the TMR1IF and IE were right on the money.=20 I appreciate everything that you have helped me with. Thanks, rich! On 7/19/2014 2:16 PM, Jan-Erik Soderholm wrote: > What is "how to use the interrupt routine" more specificaly? > > Wasn't "5.9 INTERRUPTS" in the XC8 manual clear enough? > More specificaly "5.9.1 Writing an Interrupt Service Routine"? > > When the ISR has been defined, it isn't realy "used" by the > code anymore, it is run by the hardware when an interrupt > happens. > > Jan-Erik. > > > Richard R. Pope wrote 2014-07-19 21:02: >> Allan, >> Jan-Erik gave me the answer. You are correct about the defines >> being in the PIE registers. It is fixed and it compiles correctly. Now I >> just need to know how to use the interrupt routine. That is this one: >> >> void Interrupt(){ >> if (TMR1IF_bit){ >> TMR1IF_bit =3D 0; >> TMR1H =3D 0x0B; >> TMR1L =3D 0xDC; >> //Enter your code here >> } >> } >> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .