中颖 SH79F6481芯片,使用定时器3,总是重启,定时器关掉就正常运行,代码如下:
void init_timer3()
{
_push_(INSCON);
Select_Bank1();
T3CON = 0x03;
TL3 = 0xFF;
TH3 = 0x0F;
TR3 = 1;
ET3 = 1;
EA = 1;
_pop_(INSCON);
}
void Timer3_ISP(void) interrupt 5
{
_push_(INSCON);
Select_Bank1();
DEBUG = 0;
_pop_(INSCON);
} |