cancel
Showing results for 
Search instead for 
Did you mean: 

'SCON2': invalid base address

deng
Associate II
Posted on December 11, 2009 at 14:11

'SCON2': invalid base address

2 REPLIES 2
deng
Associate II
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.

Andrew Neil
Chief II