proteus仿真最简单的程序仿真不出来
时间:10-02
整理:3721RD
点击:
刚开始第一天学习ARM,买了周立功的深入浅出ARM7看,因为没开发板,所以就用protues仿真,但是这么简单的程序怎么都弄不出来呢?程序也是书上的。根据在DebugInFlash下设置我也生成了HEX文件。但是就是仿真不出来。#include "config.h"
#define LED (1<<7) //P0.7
#define KEY1 (1<<16) //P0.16
void WaitKey(void)
{ uint32 i;
while(1)
{
while((IO0PIN&KEY1)!=0); //等待按键
for(i=0;i<50000;i++); //延时
if((IO0PIN&KEY1)==0);break;
}
while((IO0PIN&KEY1)==0);//等待按键释放
}
void DelayNS(uint32 dly)
{ uint32 i;
for(;dly>0;dly--)
for(i=0;i<50000;i++);
}
int main (void)
{// add user source code
PINSEL0=0x00000000; //设置P0.0~P0.15为GPIO功能
PINSEL1=0x00000000; //设置P0.16~P0.31为GPIO功能
IO0DIR=LED;
IO0SET=LED;
while(1)
{
WaitKey();
IO0CLR=LED;
DelayNS(20);
IO0SET=LED;
DelayNS(20);
}
return 0;
}
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpgfile:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
#define LED (1<<7) //P0.7
#define KEY1 (1<<16) //P0.16
void WaitKey(void)
{ uint32 i;
while(1)
{
while((IO0PIN&KEY1)!=0); //等待按键
for(i=0;i<50000;i++); //延时
if((IO0PIN&KEY1)==0);break;
}
while((IO0PIN&KEY1)==0);//等待按键释放
}
void DelayNS(uint32 dly)
{ uint32 i;
for(;dly>0;dly--)
for(i=0;i<50000;i++);
}
int main (void)
{// add user source code
PINSEL0=0x00000000; //设置P0.0~P0.15为GPIO功能
PINSEL1=0x00000000; //设置P0.16~P0.31为GPIO功能
IO0DIR=LED;
IO0SET=LED;
while(1)
{
WaitKey();
IO0CLR=LED;
DelayNS(20);
IO0SET=LED;
DelayNS(20);
}
return 0;
}
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpgfile:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
file:///C:\Users\samsung\AppData\Roaming\Tencent\Users\549816749\QQ\WinTemp\RichOle\~K}MD3XB}1H)H{GD7VT{77M.jpg
你的格式的部队,你的明白?