P89V51RD2 compilation problem

Discussion in 'Embedded Systems and Microcontrollers' started by jayanthyk192, Sep 17, 2010.

  1. jayanthyk192

    Thread Starter Member

    Jan 23, 2010
    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.
  2. jayanthyk192

    Thread Starter Member

    Jan 23, 2010
  3. AlexR

    Well-Known Member

    Jan 16, 2008
    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