Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

error in mikroC pro for 8051

Status
Not open for further replies.

wishes

Newbie level 3
Joined
Sep 26, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,339
hello ,
I have copy from the net the following code on "mikroC PRO for 8051" for AT89C51
the code is

#include "Include.h"
extern unsigned char NowKey;//
extern unsigned char xdata CommBuf[MAX_BUF_NUMBER];//

//
void EnableInterrupt(void)
{
EA = 1;
}

//
void DisInterrupt(void)
{
EA = 0;
}

//
void SystemInit(void)
{
FingerInit();
UARTInit();
Timer0Init();
BellInit();
LedInit();

//
EnableInterrupt();

//
BellOn();
LedRedOn();
LedBlueOn();
DelayNmS(200);
LedRedOff();
LedBlueOff();
BellOff();
}

void main(void)
{
SystemInit();

while(0)
{
KeyTest();
LedTest();
BellTest();
}

while(1)
{
switch (NowKey)
{
case ADD_KEY:
AddFingerModule();
NowKey = NO_KEY;
break;
case EMPTY_KEY:
EmptyFingerModule();
NowKey = NO_KEY;
break;
case SEARCH_KEY:
SearchFingerModule();
NowKey = NO_KEY;
break;
default:
break;
}
}
}
the include.h contain
#include "REG52.H"
#include "intrins.h"//
#include "string.h"//

void DelayNuS(unsigned char i);
void DelayNmS(unsigned char i);

void EnableInterrupt(void);
void DisInterrupt(void);


#define FALSE 0
#define OK 1
#define TIMEOUT 2


#include "Led.h"
#include "Bell.h"
#include "Key.h"
#include "Timer.h"
#include "UART.h"
#include "Finger.h"
#include "Module.h"
#include "Command.h"


when I build it I have the following error

error: 0 304 c:/users/eng.amany/desktop/at89c51/include.h:1: error: Can't open include file "reg52.h"
error: 0 304 #include "REG52.H"
error: 0 304 from C:/Users/Eng.Amany/Desktop/at89c51/attt.c: 1: #include "Include.h"
error: 0 304 c:/users/eng.amany/desktop/at89c51/include.h:2: error: Can't open include file "intrins.h"
error: 0 304 #include "intrins.h"
error: 0 304 from C:/Users/Eng.Amany/Desktop/at89c51/attt.c: 1: #include "Include.h"
error: 0 304 c:/users/eng.amany/desktop/at89c51/include.h:3: error: Can't open include file "string.h"
error: 0 304 #include "string.h"
error: 0 304 from C:/Users/Eng.Amany/Desktop/at89c51/attt.c: 1: #include "Include.h"
error: 0 304 3 errors in preprocessor.
error: 0 102 Finished (with errors): 28 Sep 2010, 20:57:17 attt.mcp51



can any one help me to solve this error
 

try to include them separately instead of
#include "Include.h"
 

can any one help me to solve this error

understand what the errors mean and learn programming by reading the compiler manual and sample code.
 

As you are using 89C51,try with #include<reg51.h> & change all the pre-processor definitions in small letters.This may be the errors.
Regards,
Jerin.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top