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

Error of header file

This is in my 89C51RE2

/*------------------ T W I (I2C) registers ------------------------------*/
Sfr ( SSCON , 0x93);

Sbit (SSCR2 , 0x93, 7);
Sbit (SSIEN , 0x93, 6);
Sbit (SSSTA , 0x93, 5);
Sbit (SSST0 , 0x93, 4);
Sbit (SSSI , 0x93, 3);
Sbit (SSAA , 0x93, 2);
Sbit (SSCR1 , 0x93, 1);
Sbit (SSCR0 , 0x93, 0);

This is the error I got while compiling 17 18 /* @section I N C L U D E S */ 19 //#include "reg_C51.h" 20 #include "89C51RE2.h"
*** ERROR C142 IN LINE 227 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 228 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 229 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 230 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 231 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 232 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 233 OF 89C51RE2.H: 'SFR': invalid base address
*** ERROR C142 IN LINE 234 OF 89C51RE2.H: 'SFR': invalid base address 21 char TWI_data; 22 char rw=0; /* 0=write, 1=read */ 23 char slave_adr; 24 bit b_TWI_busy=0;

Need help to fix this.

Thanks

Parents Reply Children
No data