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.

need help with the fowllowing program

Status
Not open for further replies.

jakshay

Newbie level 5
Joined
Jun 12, 2010
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,377
hello//
i m working on the fowllowing program....



#include<reg52.h>
#include<math.h>
#include<stdio.h>
sbit ale =P2^4;
sbit oe=P2^5;
sbit sc=P2^6;
sbit eoc=P2^7;
sfr MYDATA = 0xB0;

void msdelay(unsigned int itime)
{
unsigned int i,j;
for(i=0;i<itime;i++)
for (j=0;j<1275;j++);
}
void display(unsigned int value)
{
if(value<=0x14)
P3=0x01;
else if(value<=0x46)
P3=0x03;
else if(value<=0x64)
P3=0x07;
else if(value<=0x82)
P3=0x0F;
else if(value<=0xa0)
P3=0x1F;
else if(value<=0xB4)
P3=0x3F;
else if(value<=0xdC)
P3=0x7F;
else
P3=0xFF;
}
void main(void)
{
unsigned char value;
MYDATA=0xff;
eoc=1;
ale=0;
oe=0;
sc=0;
while(1)
{
ale=1;
msdelay(1);
sc=1;
msdelay(1);
ale=0;
sc=0;
while(eoc==1);
while(eoc==0);
oe=0;
msdelay(1);
value=MYDATA;
oe=0;
display(value);
}
}



when trying to build target in keil....
i am getting the fowllowing errors/warnings.......

Build target 'Target 1'
assembling STARTUP.A51...
compiling hanuman.c...
linking...
*** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS
NAME: VOIDMAIN/HANUMAN
*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: MAIN
MODULE: D:\KEIL\C51\LIB\C51S.LIB (?C_INIT)
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: MAIN
MODULE: D:\KEIL\C51\LIB\C51S.LIB (?C_INIT)
ADDRESS: 10008C3H
Program Size: data=9.0 xdata=0 const=0 code=326
Target not created










will be very grateful if i get any lead....

thanx in advance


j.akshay
 

Hello Akshay,

I dont see any mistakes in your code.

Even i have checked with my KEIL, i dint get any errors.

Have you solved your problem.

Regards,
Viswanath.
 

Yeah Even i checked the same...
Everything is fine...

Cheers!!!
 

code is correct i think it should work out..
i think after seeing the errors You have not added L51BANk file just add it.
just add startup.A51 file and a linker file..
these files u can find in any example project.
L51BANK.A51 try to add this file to source file..
i think u didn't add this file..
Try it
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top