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

Code not getting burned @ location 0x0000

Hello Every1,

I am using P89V51RD2BN microcontroller for my project.
To load the hex file into the Flash ROM, I am using Flash Magic.

I have written a simple code as follows :-

#include <P89V51Rx2.H>
sbit led=0x90;

main()
{ unsigned int i;

while(1)

{ led = 0x01; for(i=0;i<50000;i++); led = 0x00; for(i=0;i<50000;i++);

}
}

Though the compiled hex code gets loaded into the chip, it does not get loaded at 0x0000; instead, the three bytes starting @ 0x0000 are 02 08 4E; which as per the "Disassebly" correspond to LJMP 084E.

And I find the hex file loaded in the locations from 0x8000 to 0x858.

I would like to know why is this happening? What do I need to do to load the hex file from 0x0000 contigously.

Thanks.

0