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.

Why MC8051 IP core failed in Endless loop?

Status
Not open for further replies.

junxiu6

Newbie level 4
Joined
Jan 9, 2009
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314
MC8051 IP core is used in spartan3e, software is ISE 11.1. While running a program like fllowing, the LEDs wink all the time.

Code:
Main() {
        P1=0x55;   // P1 is connected to LEDs.
        delay(30);
        P1=0xaa;
        delay(30); 
	}

Does mc8051 go to the first place and do it again?

What’s the problem?

Thanks for your reply.

Junsoo
 

because you don't understand how the compiler deals with a return from the main().
 

millwood said:
because you don't understand how the compiler deals with a return from the main().

To millwood

how to do?
 

Main()
{
while(1)
{
P1=0x55; // P1 is connected to LEDs.
delay(30);
P1=0xaa;
delay(30);
}
}
 

hock said:
Main()
{
while(1)
{
P1=0x55; // P1 is connected to LEDs.
delay(30);
P1=0xaa;
delay(30);
}
}

Even if while(1) {} isn't used, the program is failed in endless loop.
 

Even if while(1) {} isn't used, the program is failed in endless loop.


because you don't understand how the compiler deals with a return from the main().
 

millwood said:
Even if while(1) {} isn't used, the program is failed in endless loop.


because you don't understand how the compiler deals with a return from the main().

Can you tell me what I can do? I'm really appreciated.

The detailed situation is shown in attached.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top