Skip to main content
Visitor II
December 11, 2009
Question

'SCON2': invalid base address

  • December 11, 2009
  • 2 replies
  • 845 views
Posted on December 11, 2009 at 14:11

'SCON2': invalid base address

    This topic has been closed for replies.

    2 replies

    dengAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:52

    Hi All,

    I am using the uPSD3254BV-24U6. I am able to get UART1 working fine. And trying to setup UART2 to work like the UART1. When I make the changes to the SCON2 in the UPSD.h file and try to complie it using Keil, I got the following errors messages:

    E:\COMMUN\KEILV70\C51\INC\ST\UPSD.H(264): error C146: 'SCON2': invalid base address

    Here is what I have in the UPSD.h file:

    // --- UART2 SFRS ----

    sfr SCON2 = 0x9A; // UART2 Serial Control

    sfr SBUF2 = 0x9B; // UART2 Serial Buffer

    :

    :

    /* SCON 2 */

    sbit SM02 = SCON2^7;

    sbit SM12 = SCON2^6;

    sbit SM22 = SCON2^5;

    sbit REN2 = SCON2^4;

    sbit TB82 = SCON2^3;

    sbit RB82 = SCON2^2;

    sbit TI2 = SCON2^1;

    sbit RI2 = SCON2^0;

    Any idea what I did wrong? From looking at the datasheet, the Sfr address is correct.

    Best Regards.

    Super User
    May 17, 2011