void time1_init()
{
TCCR1B=0x04;
TCNT1H=0x8f;
TCNT1L=0x80;
TIMSK|=0x04;
SREG|=0x80;
}
SIGNAL(SIG_OVERLOW1)
{
uchar a;
TCNT1H=0x8f;
TCNT1L=0x80;//1s一次中断
read_rtc();
time_chuli();
writedata(0,2,dis[0]);//time
writedata(1,2,dis[1]);//year month
writedata(1,10,dis[2]);//day
writedata(1,15,weektable);//week
}
根本就不执行中断函数内的内容,反而程序从头开始执行了。。。。晕啊! |