/*SINE4C.C - SINE PROGRAM WITH 4 POINTS USING INTERRUPTS */ #include "aiccomc.c" /*AIC comm routines */ int AICSEC[4] = {0x162C,0x1,0x4892,0x67}; /*config data for AIC */ int loop = 0; /*declare global variables */ int sin_table[4] = {0,1000,0,-1000}; /*values for 4-point sinewave */ void c_int05() /*XINT0 interrupt routine */ { PBASE[0x48] = sin_table[loop] << 2; /*output value from sine table*/ if (loop < 3) ++loop; /*increment loop counter < 3 */ else loop = 0; /*reset loop counter */ } main() { AICSET_I(); /*function to configure AIC */ for (;;); /*wait for interrupt */ }