wishes
Newbie level 3
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
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