P89V51RD2 compilation problem

Thread Starter

jayanthyk192

Joined Jan 23, 2010
80
i'm using P89V51RD2 MC for my project,i got a ready made code to use LCDs.i used reg51.h.i also defined the pins:
#define SCK P3^1
#define DAT P3^2
#define DC P3^3
#define CE P3^4
#define RES P3^5

the compiler is throwing the following error:undefined identifier P1,P2 etc.

how can i solve this problem?this kind of identifier is working AT89x51.h.how do i make it work for P89V51RD2.i'm not a pro,please help.Please see attached TXT for header.
 

Attachments

AlexR

Joined Jan 16, 2008
735
You need to include the header file for the P89V51RD2 device in your source file ahead of your "#define" statements so that the compiler knows what P3 is.

The header file should come with the compiler (look for P89V51RD2.H or P89V51RX2.H) but if for any reason you can't find it you can get it here http://www.keil.com/dd/chip/3711.htm
 
Top