Can anyone please tell me what header should i use for P89V51RD2 in Keil.Tried both p89v51rx2.h and p89v51rd2.h but still getting errors related to header file.Thank you.
Thanks tushki7 for the reply.I found it has nothing to so with syntax because once i change the header to reg51.h it works fine.The header p89v51rd2.h attracts errors such as undefined identifier and there is a warning in the start saying cant open file p89v51rd2.h.Additionally it compiled well when i used SDCC compiler.The reason why i am shifting to P89V51rd2.h from 89c51 is i need to limit my code size in 89c51
Can't open file means that the compiler cannot find your p89v51rd2.h file in its include directory. Go to your keil INC directory and check if p89v51rd2.h header file is there. If its not there you need to download it from keil site.
Or
Your p89v51rd2.h file may be corrupted, re download it.
On the second thought after reading your first comment I am sure your both p89v51rd2.h and p89v51rx2.h files are missing from include directory.
P89v51rd2 has 64KB flash while at89c51 has 4KB, p89 has some additional functions like its X2 mode, 1 more timer etc. There are many more differences, the point is it is better to use micro controller specific header files. Note : Be careful unlicensed keil has a code size limit of 2KB only.
P89v51rd2 has 64KB flash while at89c51 has 4KB, p89 has some additional functions like its X2 mode, 1 more timer etc. There are many more differences, the point is it is better to use micro controller specific header files. Note : Be careful unlicensed keil has a code size limit of 2KB only.
Post your code here.
According to warning problem seems to be that you have included both header files if so, Don't use both header files, use either reg51.h or p89v51rd2.h.
Or
You may have redefine some port or something that is already defined in header file.
Post your code here.
According to warning problem seems to be that you have included both header files if so, Don't use both header files, use either reg51.h or p89v51rd2.h.
Or
You may have redefine some port or something that is already redefined in header file.
Yeah.i had read that.tried compiling but both in Keil and SDCC the two controllers seems to have the same code size.Program Size: data=128.0 xdata=0 code=2802 seems to be maximum for both codes.beyond that *** ERROR L107: ADDRESS SPACE OVERFLOW error is showing.