#include #include void IH(void); volatile char temp = 0x00; main() { _ATTACH (IH, 8); /* OC interrupt */ _H11TMSK1 = 0x40; /* enable OC2 */ _H11TOC2 = 0x9999; _H11TCTL1 = 0x40; /* toggle PA6 */ _H11DDRC = 0xFF; /* set portc output */ _H11PORTC = 0x00; /* and start with 0 */ while(1) { } } void IH(void) { int i,j; if( temp == 0x00 ) _H11PORTC = 0xff; if( temp != 0x00 ) _H11PORTC = 0x00; for(i=0; i<100; i++) for(j=0; j<1000; j++); temp ^= 0xff; /* toggle portc */ _H11TFLG1 = 0x40; }