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.

led display scaning program having some warning in keil

Status
Not open for further replies.

thannara123

Advanced Member level 5
Joined
Jan 7, 2010
Messages
1,580
Helped
122
Reputation
244
Reaction score
114
Trophy points
1,353
Location
India
Activity points
10,392
#include <REGX51.H>


void msdelay(unsigned int);
vid(clock);
void set();
void dispaly(unsigned char);

void msdelay(unsigned int itime)
{
unsigned int i,j;

for(i=0; i<itime; i++)
{
for(j=0; j<100; j++)
{ } }
}

void clock ()
{
P1_0 = 1;
P1_0 = 0;
}
void display(unsigned char c)
{

P0 = c;
msdelay(1);
// clock();

}

void set()
{
P1_1 = 0;
P1_1 = 1;
}

void main(void)
{

void set();
P0 = 0x00;
P1 = 0x00;
display(0x88);
display(0x94);
display(0x02);
display(0x01);
display(0x01);
display(0x81);
display(0x58);
display(0x10);
set();
}


when i run the above program the keil shows some warning what is that
Build target 'Target 1'
compiling ledstil.c...
linking...
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?CLOCK?LEDSTIL
Program Size: data=9.0 xdata=0 code=114
creating hex file from "ledstiill"...
"ledstiill" - 0 Error(s), 1 Warning(s).

please help me
 

I think its just telling you that Clock() is not being used ... .(At the top it is vid(clock); too but I sure thats just a typo :)

Don't worry if it is ony a warning, get rid of Clock() and I'm sure it'll dissapear but I'm no expert!
Kind regards
NEAL
 

sorry i used the // to check in my actual program there is no comment sign that is clock()
 

Check this: BL51 User's Guide: Warning L16 (*** Warning L16.)

It says:
This warning occurs when functions, which were not previously called, are contained in a program (e.g., for test purposes). The function specified is excluded from the overlay process in this case. It is possible that the program then occupies more memory as during a call of the specified segment.

Also check the related knowledge base articles in that link.

Hope this helps.
Tahmid.

---------- Post added at 00:06 ---------- Previous post was at 00:05 ----------

sorry i used the // to check in my actual program there is no comment sign that is clock()

So, you're saying that you placed the // for checking. In the program, you don't have // ? Is that so?
 

//void clock ()
//{
//P1_0 = 1;
//P1_0 = 0;
//}

should do it
NEAL:)
 
But you do realize that the warning will cause no problem in the created hex file and that the program has compiled successfully, right?
 
thanks corrected
#include <REGX51.H>


void msdelay(unsigned int);
vid(clock);
void set();
void dispaly(unsigned char);

void msdelay(unsigned int itime)
{
unsigned int i,j;

for(i=0; i<itime; i++)
{
for(j=0; j<100; j++)
{ } }
}

void clock (void)
{
P1_0 = 1;
P1_0 = 0;
}
void display(unsigned char c)
{

P0 = c;
msdelay(1);
clock();

}

void set()
{
P1_1 = 0;
P1_1 = 1;
}

void main(void)
{

void set();
P0 = 0x00;
P1 = 0x00;
display(0x88);
display(0x94);
display(0x02);
display(0x01);
display(0x01);
display(0x81);
display(0x58);
display(0x10);
set();
}
 

I did wonder where the "clock" bit went!! I see now, I was thinking that earlier!

Incidentally this has coincided with me finding, on one of those "old bits of kit I always thought I'd rip to bits and find useful" thats been in the attick 10 years (an IDE Hard disk copier) has a big 128x64 LCD display on it I think your' code is designed for me to use upon it (nearly :) )!! It happens to fit pin-perfect in my DemoBoard2 (but I;ve blown half of port C playing with stepper motors, awaiting replacements in post) so I'll cut and paste your code replacing the ports and see if it works! It can't be far off!!! your Port0 is my Port C I think, and the strobe lines I can work out....

Well done mate, keep on coding!
Neal
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top