proteus仿真出现Simula
tion is not running in real time due to excessive CPU load怎麽解决,请高手帮我解决下啊!!,感觉
电路也不复杂啊!,下面是程序:#include <MSP430x24x.h>#define uchar unsigned char
#define uint unsigned int
uchar const table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07, //共阴数码管段选码表,无小数点
0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
void delayms(uint t)
{
uint i;
while(t--)
for(i=1330;i>0;i--);//进过参数的调整
}
void main(void)
{
uchar i;
WDTCTL=WDTPW + WDTHOLD; // 关闭看门狗
P1DIR=0xFF; // 设置方向
P1SEL=0; // 设置为普通I/O 口
P1OUT=0x00;
while(1)
{
for(i=0;i<10;i++)
{
P1OUT=table
;
delayms(100);
}
}
}
-
一周热门 更多>