如题,软仿没问题一切正常,硬件仿真在观察窗口A B C始终有个变量值为Reserved Memory,且无地址!神奇的很!不明白是什么问题,求高手指教谢谢了
#include <pic.h>
__CONFIG (0x1BC4);//debug
unsigned char A;
unsigned char B;
unsigned char C;
//===============================================================================
void main(void)
{
OSCCON=0X3C;
while(1)
{
for (A=0;A<=80;A++);
for (B=0;B<=80;B++);
for (C=0;C<=60;C++);
}
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
{
for (A=0;A<=80;A++) NOP();
for (B=0;B<=80;B++) NOP();
for (C=0;C<=60;C++) NOP();
}
}
如题,软仿没问题一切正常,硬件仿真在观察窗口a b c始终有个变量值为reserved memory,且无地址!神奇的很!不明白是什么问题,求高手指教谢谢了
#include <pic.h>
__config (0x1bc4);//debug
unsigned char a;
unsigned char b;
unsigned char c;
//===============================================================================
void main(void)
{
osccon=0x3c;
while(1)
{
for (a=0;a<=80;a++);
for (b=0;b<=80;b++);
for (c=0;c<=60;c++);
}
}
-----------------------------------------------------------------------
我也遇到过!目前还没解决...真想对PIC吐槽!
要不这样测试看看
while(1)
{
for (A=0;A<=80;A++) PA = 0;
for (B=0;B<=80;B++) PB = 0;
for (C=0;C<=60;C++) PC = 0;
}
}
是不是9.8版本的有问题啊,不过它编译出的代码相比之下少了很多。。。
#include <pic.h>
__CONFIG (0x1BC4);//debug
volatile unsigned char A;
volatile unsigned char B;
volatile unsigned char C;
//===============================================================================
void main(void)
{
OSCCON=0X3C;
while(1)
{
for (A=0;A<=80;A++);
for (B=0;B<=80;B++);
for (C=0;C<=60;C++);
}
}
一周热门 更多>