你好~~帮我看下下面的程序要怎么改?中断定时1S攻能不能实现,(那些参数没变,用查询的方式可以实现)用的是IAR编绎器,谢谢了 #include<iolpc2468.h> #define uint unsigned int uint LED=0X55; main(void) { FIO2DIR=0XFF; FIO2SET=LED; T0TC=0; T0PR=0; T0MCR=0X03; T0MR0=1000000; /*1M的PCLK*/ T0TCR=0X01; VICIntSelect=0x00000000; VICVectAddr4=0x00000010; VICVectPriority4=0x00; VICIntEnable=0x00000010; while(1);
} #pragma vector=0x00000010 __irq __arm void time0_rupt(void) { T0IR=0X01; FIO2CLR=0X000000FF; FIO2SET=LED; LED=((~LED)&0X000000FF); VICAddress=0x00; } |