利用MKD的软件调试函数产生信号,用软件仿真。一下是我的仿真函数: signal void one_thou_hz (void) { while (1) { /* repeat forever */ PORTA |= 1; /* set PORTA bit 0 */ twatch (10000); /* delay for .0005 secs */ PORTA &= ~1; /* clear PORTA bit 0 */ twatch (10000); /* delay for .0005 secs */ } /* repeat */ }