This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trouble with AT89S8252 programming

Hi all,

I'm new to 8051, have written this simple program, please see if this is correct

#include <AT89S8252.h>

void wait (void)
{
;
}

void main( void )
{
unsigned int i;

P1 = 0;

while(1)
{
P1=1;
for (i=0;i<20000;i++)
{
wait();
}
P1=0;
}
}

After compiling I got this hex

:0300000002001CDF
:0C001C00787FE4F6D8FD75810702000330
:0100280022B5
:10000300C292D292E4FFFE1200280FBF00010EBE7F
:090013004EF5BF20F2C29280E913
:00000001FF

Unfortunately this is not working when I programmed it on AT89S8252. Please help me to figure out the problem.

Thanks

Parents
  • "As I told you I'm newbie, right now I don't know I to use simulator."

    You need to start by reading the uVision Getting Started Guide, and working through the example projects in it.

    This will give you a proper introduction to the tools, how they work, and how to use them - rather than just jumping-in blindly at the deep end.
    (The uVision Getting Started Guide is available on the 'Books' tab in the 'Project' Window; The 'Books' window is also available via the 'Help' menu; failing all that, search for GS51.PDF in your Keil folder)

Reply
  • "As I told you I'm newbie, right now I don't know I to use simulator."

    You need to start by reading the uVision Getting Started Guide, and working through the example projects in it.

    This will give you a proper introduction to the tools, how they work, and how to use them - rather than just jumping-in blindly at the deep end.
    (The uVision Getting Started Guide is available on the 'Books' tab in the 'Project' Window; The 'Books' window is also available via the 'Help' menu; failing all that, search for GS51.PDF in your Keil folder)

Children
No data