MUC里已经有监控程序,总线频率为24MHZ
long int i=0;
void IO_Init(){
DDRB = 0xFF;
}
void Timer_Init(void) //向下计数器初始化
{
MCCNT=0Xea60; //60000*16/24/1000000= 0.04S中断一次
MCCTL=0xE7;
}
//#pragma CODE_SEG NON_BANKED
interrupt 26 void MDC_ISD() //向下溢出中断
{i++;
if(i==1000)
{
PORTB=~PORTB;
i=0;
}
//MCCNT=0xFFFF;
MCFLG_MCZF = 1;
}
//#pragma CODE_SEG DEFAULT
void main(void) {
/* put your own code here */
IO_Init();
PORTB=0x0F;
Timer_Init();
EnableInterrupts;
for(;;) {} /* wait forever */
/* please make sure that you never leave this function */
如此计算正确吧?
我发现我只能发新帖,却不能回复帖子,真奇怪.
点击"回复",出现:
Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'showreform'
/reannounce.asp,行124
|