找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4811|回复: 3
打印 上一主题 下一主题
收起左侧

新手请教

[复制链接]
跳转到指定楼层
楼主
ID:25285 发表于 2010-7-27 11:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

请各位大侠指导一下,下面程序的错误在哪:

#include<eg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar temp;
void delay();
void main()
{
  temp=0xfe;
  P1=temp;
 while(1)
 {
  temp=_crol_(temp,1);
  delay(600);
  P1=temp;
 }
}

void delay()
{
 uint x,y;
 for(x=100;x>0;x--)
  for(y=2000;y>0;y--); 
}

 

 

以下为错误提示:

Build target 'Target 1'
assembling STARTUP.A51...
compiling 0727.c...
*** WARNING C318 IN LINE 1 OF 0727.c: can't open file 'eg52.h'
0727.C(4): error C202: 'P1': undefined identifier
0727.C(10): error C202: 'D1': undefined identifier
0727.C(12): error C202: 'D1': undefined identifier
compiling 07271.c...
*** WARNING C318 IN LINE 1 OF 07271.c: can't open file 'eg52.h'
07271.C(10): error C202: 'P1': undefined identifier
07271.C(15): error C202: 'P1': undefined identifier
Target not created

具体可以看附件。

谢谢各位指导!

 

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:1 发表于 2010-7-27 11:41 | 只看该作者

错在第一行 #include<reg52.h> 你掉了一个 r

回复

使用道具 举报

板凳
ID:24712 发表于 2010-7-27 22:19 | 只看该作者
LS真是一言惊醒梦中人啊,难怪一看就觉得那里怪怪的呢
回复

使用道具 举报

地板
ID:25285 发表于 2010-7-28 11:32 | 只看该作者

谢谢admin

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表