#pragma option f0 /* * COP8C Code Development System * Tutorial Interrupt Example * INT1.C * This code may be adapted for any purpose * when used with the COP8C Code Development * System. No warranty is implied or given * as to their usability for any purpose. * * (c) Copyright 2000 Byte Craft Limited * 421 King St.N., Waterloo, ON, Canada, N2J 4E4 * VOICE: 1 (519) 888 6911 * FAX : 1 (519) 746 6751 * email: support@bytecraft.com * * REVISION HISTORY * v1.00 AL 01/2000 Initial Version. */ #include #include /*_rtccint_*/ #include void __INT(void) { if( PSW.TPND ) /* a timer underflow has occured */ { /* handle timer interrupt */ PSW.TPND = 0; /* clear pending flag */ } } void main(void) { /* -timer with input capture register * -interrup on TIO negative edge * -timer counts on instruction clock * -start timer */ CNTRL=(1<