#pragma CODE_SEG NON_BANKED interrupt 8 void Interrupt_TIMER0(void){ TC0=0xffff; TCNT=0x00ff;//????????????? PORTB=j; j=j*2; if(j==0x80)j=1;//流水灯 TFLG1=0x01; }
void main(void) { DDRB=0xFF; PORTB=0xFF; TIOS=0x01; TIE=0x01; TCTL2=0x03; TC0=0xffff; TSCR2=0x87; TSCR1=0x80; EnableInterrupts; for(;;) { asm { nop; nop; nop; } }; } 程序如上,您帮我看看吧,谢谢了,我也不知道问题出在哪,单步时好像一直没跳出来
[此贴子已经被作者于2006-3-20 21:20:41编辑过] |